diff options
| author | Jacob Palecki <[email protected]> | 2020-09-11 12:59:25 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-11 12:59:25 -0700 |
| commit | 0e60f2c30b147605c22413af2de243cdc5373f7e (patch) | |
| tree | a7731db76fe3aeb00a45f31e23f2fcf8a249db81 | |
| parent | Add alpha (diff) | |
| download | rawaccel-0e60f2c30b147605c22413af2de243cdc5373f7e.tar.xz rawaccel-0e60f2c30b147605c22413af2de243cdc5373f7e.zip | |
Fix box write
| -rw-r--r-- | grapher/Form1.cs | 2 | ||||
| -rw-r--r-- | grapher/Models/Fields/Field.cs | 14 | ||||
| -rw-r--r-- | grapher/Models/Fields/FieldXY.cs | 16 | ||||
| -rw-r--r-- | grapher/Models/Options/Option.cs | 6 |
4 files changed, 25 insertions, 13 deletions
diff --git a/grapher/Form1.cs b/grapher/Form1.cs index 103f239..3f2ca2a 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -58,7 +58,7 @@ namespace grapher gainOffsetToolStripMenuItem, legacyOffsetToolStripMenuItem, AutoWriteMenuItem, - scaleByDPIToolStripMenuItem, + ScaleMenuItem, DPITextBox, PollRateTextBox, sensitivityBoxX, diff --git a/grapher/Models/Fields/Field.cs b/grapher/Models/Fields/Field.cs index 0d1813e..df73dd7 100644 --- a/grapher/Models/Fields/Field.cs +++ b/grapher/Models/Fields/Field.cs @@ -61,7 +61,7 @@ namespace grapher public double Data { get { - if (Box.Visible) + if (Box.Enabled) { return _data; } @@ -126,6 +126,18 @@ namespace grapher #region Methods + public void Hide() + { + Box.Hide(); + Box.Enabled = false; + } + + public void Show() + { + Box.Show(); + Box.Enabled = true; + } + public void SetToDefault() { if (State != FieldState.Default) diff --git a/grapher/Models/Fields/FieldXY.cs b/grapher/Models/Fields/FieldXY.cs index 15e6800..1c01668 100644 --- a/grapher/Models/Fields/FieldXY.cs +++ b/grapher/Models/Fields/FieldXY.cs @@ -106,7 +106,7 @@ namespace grapher { get { - return XField.Box.Visible; + return XField.Box.Enabled; } } @@ -137,7 +137,7 @@ namespace grapher { Combined = true; YField.SetToUnavailable(); - YField.Box.Hide(); + YField.Hide(); XField.Box.Width = CombinedWidth; XField.FormatString = Constants.DefaultFieldFormatString; } @@ -160,26 +160,26 @@ namespace grapher YField.SetToEntered(XField.Data); } - if (XField.Box.Visible) + if (XField.Box.Enabled) { - YField.Box.Show(); + YField.Show(); } } public void Show() { - XField.Box.Show(); + XField.Show(); if (!Combined) { - YField.Box.Show(); + YField.Show(); } } public void Hide() { - XField.Box.Hide(); - YField.Box.Hide(); + XField.Hide(); + YField.Hide(); } #endregion Methods diff --git a/grapher/Models/Options/Option.cs b/grapher/Models/Options/Option.cs index 5dc022b..c0d339e 100644 --- a/grapher/Models/Options/Option.cs +++ b/grapher/Models/Options/Option.cs @@ -119,7 +119,7 @@ namespace grapher { get { - return Field.Box.Visible; + return Field.Box.Enabled; } } @@ -140,14 +140,14 @@ namespace grapher public override void Hide() { - Field.Box.Hide(); + Field.Hide(); Label.Hide(); ActiveValueLabel.Hide(); } public void Show() { - Field.Box.Show(); + Field.Show(); Label.Show(); ActiveValueLabel.Show(); } |