summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/OptionXY.cs
diff options
context:
space:
mode:
Diffstat (limited to 'grapher/Models/Options/OptionXY.cs')
-rw-r--r--grapher/Models/Options/OptionXY.cs84
1 files changed, 72 insertions, 12 deletions
diff --git a/grapher/Models/Options/OptionXY.cs b/grapher/Models/Options/OptionXY.cs
index 8e22617..6d6129a 100644
--- a/grapher/Models/Options/OptionXY.cs
+++ b/grapher/Models/Options/OptionXY.cs
@@ -1,20 +1,18 @@
using grapher.Models.Options;
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Windows.Forms;
namespace grapher
{
- public class OptionXY
+ public class OptionXY : OptionBase
{
+ #region Constructors
public OptionXY(FieldXY fields, Label label, ActiveValueLabelXY activeValueLabels)
{
Fields = fields;
Label = label;
ActiveValueLabels = activeValueLabels;
+ ActiveValueLabels.Left = fields.CombinedWidth + fields.Left;
}
public OptionXY(
@@ -24,9 +22,8 @@ namespace grapher
Form containingForm,
double defaultData,
Label label,
- AccelCharts accelCharts,
ActiveValueLabelXY activeValueLabels)
- : this(new FieldXY(xBox, yBox, lockCheckBox, containingForm, defaultData, accelCharts), label, activeValueLabels)
+ : this(new FieldXY(xBox, yBox, lockCheckBox, containingForm, defaultData), label, activeValueLabels)
{
}
@@ -38,8 +35,7 @@ namespace grapher
double defaultData,
Label label,
ActiveValueLabelXY activeValueLabels,
- string startingName,
- AccelCharts accelCharts):
+ string startingName):
this(
xBox,
yBox,
@@ -47,18 +43,76 @@ namespace grapher
containingForm,
defaultData,
label,
- accelCharts,
activeValueLabels)
{
SetName(startingName);
}
+ #endregion Constructors
+
+ #region Properties
+
public FieldXY Fields { get; }
public Label Label { get; }
public ActiveValueLabelXY ActiveValueLabels { get; }
+ public override int Top
+ {
+ get
+ {
+ return Fields.Top;
+ }
+ set
+ {
+ Fields.Top = value;
+ }
+ }
+
+ public override int Height
+ {
+ get
+ {
+ return Fields.Height;
+ }
+ }
+
+ public override int Left
+ {
+ get
+ {
+ return Fields.Left;
+ }
+ set
+ {
+ Fields.Left = value;
+ }
+ }
+
+ public override int Width
+ {
+ get
+ {
+ return Fields.Width;
+ }
+ set
+ {
+ Fields.Width = value;
+ }
+ }
+
+ public override bool Visible
+ {
+ get
+ {
+ return Fields.Visible;
+ }
+ }
+ #endregion Properties
+
+ #region Methods
+
public void SetName(string name)
{
Label.Text = name;
@@ -71,7 +125,12 @@ namespace grapher
ActiveValueLabels.SetValues(x, y);
}
- public void Hide()
+ public override void AlignActiveValues()
+ {
+ ActiveValueLabels.AlignActiveValues();
+ }
+
+ public override void Hide()
{
Fields.Hide();
Fields.LockCheckBox.Hide();
@@ -85,12 +144,13 @@ namespace grapher
Label.Show();
}
- public void Show(string name)
+ public override void Show(string name)
{
SetName(name);
Show();
}
+ #endregion Methods
}
}