summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/Option.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-07 15:19:39 -0700
committerJacob Palecki <[email protected]>2020-09-07 15:19:39 -0700
commitaff3a066575f4bfa429f67a5104a1fcffc5f326e (patch)
tree975c8cf984e97d818ebf530b68a246f4a4b1aefb /grapher/Models/Options/Option.cs
parentPass args by ref for setting (diff)
downloadrawaccel-aff3a066575f4bfa429f67a5104a1fcffc5f326e.tar.xz
rawaccel-aff3a066575f4bfa429f67a5104a1fcffc5f326e.zip
Refactor type options
Diffstat (limited to 'grapher/Models/Options/Option.cs')
-rw-r--r--grapher/Models/Options/Option.cs34
1 files changed, 16 insertions, 18 deletions
diff --git a/grapher/Models/Options/Option.cs b/grapher/Models/Options/Option.cs
index 22b78d4..68ecf66 100644
--- a/grapher/Models/Options/Option.cs
+++ b/grapher/Models/Options/Option.cs
@@ -8,7 +8,7 @@ using System.Windows.Forms;
namespace grapher
{
- public class Option
+ public class Option : OptionBase
{
#region Constructors
@@ -72,7 +72,7 @@ namespace grapher
public ActiveValueLabel ActiveValueLabel { get; }
- public int Top
+ public override int Top
{
get
{
@@ -85,7 +85,7 @@ namespace grapher
}
}
- public int Height
+ public override int Height
{
get
{
@@ -93,18 +93,18 @@ namespace grapher
}
}
- public int Left
+ public override int Left
{
get
{
return Label.Left;
}
- private set
+ set
{
Label.Left = value;
}
}
- public int Width
+ public override int Width
{
get
{
@@ -112,6 +112,14 @@ namespace grapher
}
}
+ public override bool Visible
+ {
+ get
+ {
+ return Field.Box.Visible;
+ }
+ }
+
#endregion Properties
#region Methods
@@ -127,7 +135,7 @@ namespace grapher
ActiveValueLabel.SetValue(value);
}
- public void Hide()
+ public override void Hide()
{
Field.Box.Hide();
Label.Hide();
@@ -146,23 +154,13 @@ namespace grapher
ActiveValueLabel.SetValue(value);
}
- public void Show(string name)
+ public override void Show(string name)
{
SetName(name);
Show();
}
- public void SnapTo(Option option)
- {
- Top = option.Top + option.Height + Constants.OptionVerticalSeperation;
- }
-
- public void SnapTo(CapOptions option)
- {
- Top = option.Top + option.Height + Constants.OptionVerticalSeperation;
- }
-
#endregion Methods
}
}