diff options
| author | Jacob Palecki <[email protected]> | 2020-09-08 14:44:53 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-08 14:44:53 -0700 |
| commit | 25ab05b2854428891b1615b7b78e9257c2d6db35 (patch) | |
| tree | e218d46d27d291b8f264611c8f267e7687232d93 /grapher/Models/Charts/AccelCharts.cs | |
| parent | Center write button (diff) | |
| download | rawaccel-25ab05b2854428891b1615b7b78e9257c2d6db35.tar.xz rawaccel-25ab05b2854428891b1615b7b78e9257c2d6db35.zip | |
Add option to turn off last mouse move dot
Diffstat (limited to 'grapher/Models/Charts/AccelCharts.cs')
| -rw-r--r-- | grapher/Models/Charts/AccelCharts.cs | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/grapher/Models/Charts/AccelCharts.cs b/grapher/Models/Charts/AccelCharts.cs index 9040851..84673b8 100644 --- a/grapher/Models/Charts/AccelCharts.cs +++ b/grapher/Models/Charts/AccelCharts.cs @@ -16,6 +16,7 @@ namespace grapher ChartXY velocityChart, ChartXY gainChart, ToolStripMenuItem enableVelocityAndGain, + ToolStripMenuItem enableLastMouseMove, Button writeButton) { Estimated = new EstimatedPoints(); @@ -28,6 +29,7 @@ namespace grapher VelocityChart = velocityChart; GainChart = gainChart; EnableVelocityAndGain = enableVelocityAndGain; + EnableLastValue = enableLastMouseMove; WriteButton = writeButton; SensitivityChart.SetPointBinds(Estimated.Sensitivity, EstimatedX.Sensitivity, EstimatedY.Sensitivity); @@ -44,7 +46,9 @@ namespace grapher FormBorderHeight = screenRectangle.Top - ContaingForm.Top; EnableVelocityAndGain.Click += new System.EventHandler(OnEnableClick); - EnableVelocityAndGain.CheckedChanged += new System.EventHandler(OnEnableCheckStateChange); + EnableVelocityAndGain.CheckedChanged += new System.EventHandler(OnEnableVelocityGainCheckStateChange); + + EnableLastValue.CheckedChanged += new System.EventHandler(OnEnableLastMouseMoveCheckStateChange); HideVelocityAndGain(); Combined = false; @@ -65,6 +69,8 @@ namespace grapher public ToolStripMenuItem EnableVelocityAndGain { get; } + private ToolStripMenuItem EnableLastValue { get; } + private Button WriteButton { get; } public AccelData AccelData { get; } @@ -95,11 +101,14 @@ namespace grapher } } - public void DrawPoints() + public void DrawLastMovement() { - SensitivityChart.DrawPoints(); - VelocityChart.DrawPoints(); - GainChart.DrawPoints(); + if (EnableLastValue.Checked) + { + SensitivityChart.DrawLastMovementValue(); + VelocityChart.DrawLastMovementValue(); + GainChart.DrawLastMovementValue(); + } } public void Bind() @@ -153,7 +162,7 @@ namespace grapher EnableVelocityAndGain.Checked = !EnableVelocityAndGain.Checked; } - private void OnEnableCheckStateChange(object sender, EventArgs e) + private void OnEnableVelocityGainCheckStateChange(object sender, EventArgs e) { if (EnableVelocityAndGain.Checked) { @@ -165,6 +174,16 @@ namespace grapher } } + private void OnEnableLastMouseMoveCheckStateChange(object sender, EventArgs e) + { + if (!EnableLastValue.Checked) + { + SensitivityChart.ClearLastValue(); + VelocityChart.ClearLastValue(); + GainChart.ClearLastValue(); + } + } + private void ShowVelocityAndGain() { VelocityChart.Show(); |