summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/OptionXY.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-08-20 12:51:33 -0700
committerJacob Palecki <[email protected]>2020-08-20 12:51:33 -0700
commitfe17d04e571d180e663c7014e803ce790693f4b1 (patch)
treec2e026ab79b73d3e48cc71aebde90b095771587c /grapher/Models/Options/OptionXY.cs
parentAdd empty active labels for all options (diff)
downloadrawaccel-fe17d04e571d180e663c7014e803ce790693f4b1.tar.xz
rawaccel-fe17d04e571d180e663c7014e803ce790693f4b1.zip
Display active values
Diffstat (limited to 'grapher/Models/Options/OptionXY.cs')
-rw-r--r--grapher/Models/Options/OptionXY.cs22
1 files changed, 17 insertions, 5 deletions
diff --git a/grapher/Models/Options/OptionXY.cs b/grapher/Models/Options/OptionXY.cs
index 90a46d7..b22bb78 100644
--- a/grapher/Models/Options/OptionXY.cs
+++ b/grapher/Models/Options/OptionXY.cs
@@ -1,4 +1,5 @@
-using System;
+using grapher.Models.Options;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -9,10 +10,11 @@ namespace grapher
{
public class OptionXY
{
- public OptionXY(FieldXY fields, Label label)
+ public OptionXY(FieldXY fields, Label label, ActiveValueLabelXY activeValueLabels)
{
Fields = fields;
Label = label;
+ ActiveValueLabels = activeValueLabels;
}
public OptionXY(
@@ -22,8 +24,9 @@ namespace grapher
Form containingForm,
double defaultData,
Label label,
- AccelCharts accelCharts)
- : this(new FieldXY(xBox, yBox, lockCheckBox, containingForm, defaultData, accelCharts), label)
+ AccelCharts accelCharts,
+ ActiveValueLabelXY activeValueLabels)
+ : this(new FieldXY(xBox, yBox, lockCheckBox, containingForm, defaultData, accelCharts), label, activeValueLabels)
{
}
@@ -34,6 +37,7 @@ namespace grapher
Form containingForm,
double defaultData,
Label label,
+ ActiveValueLabelXY activeValueLabels,
string startingName,
AccelCharts accelCharts):
this(
@@ -43,7 +47,8 @@ namespace grapher
containingForm,
defaultData,
label,
- accelCharts)
+ accelCharts,
+ activeValueLabels)
{
SetName(startingName);
}
@@ -52,12 +57,19 @@ namespace grapher
public Label Label { get; }
+ public ActiveValueLabelXY ActiveValueLabels { get; }
+
public void SetName(string name)
{
Label.Text = name;
Label.Left = Convert.ToInt32((Fields.XField.Box.Left / 2.0) - (Label.Width / 2.0));
}
+ public void SetActiveValues(double x, double y)
+ {
+ ActiveValueLabels.SetValues(x, y);
+ }
+
public void Hide()
{
Fields.Hide();