From 99e58acc46365fd5edc72d9b6b2ba90a94f54a4b Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 27 Sep 2020 00:53:19 -0700 Subject: Fix for second dot not clearing: --- grapher/Models/Charts/ChartState/CombinedState.cs | 4 ++++ grapher/Models/Charts/ChartState/XYTwoGraphState.cs | 4 ++++ grapher/Models/Charts/ChartXY.cs | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/grapher/Models/Charts/ChartState/CombinedState.cs b/grapher/Models/Charts/ChartState/CombinedState.cs index f4b6b8f..802c392 100644 --- a/grapher/Models/Charts/ChartState/CombinedState.cs +++ b/grapher/Models/Charts/ChartState/CombinedState.cs @@ -24,6 +24,10 @@ namespace grapher.Models.Charts.ChartState SensitivityChart.SetCombined(); VelocityChart.SetCombined(); GainChart.SetCombined(); + + SensitivityChart.ClearSecondDots(); + VelocityChart.ClearSecondDots(); + GainChart.ClearSecondDots(); } public override void MakeDots(int x, int y, double timeInMs) diff --git a/grapher/Models/Charts/ChartState/XYTwoGraphState.cs b/grapher/Models/Charts/ChartState/XYTwoGraphState.cs index b775853..017d3d1 100644 --- a/grapher/Models/Charts/ChartState/XYTwoGraphState.cs +++ b/grapher/Models/Charts/ChartState/XYTwoGraphState.cs @@ -45,6 +45,10 @@ namespace grapher.Models.Charts.ChartState SensitivityChart.SetSeparate(); VelocityChart.SetSeparate(); GainChart.SetSeparate(); + + SensitivityChart.ClearSecondDots(); + VelocityChart.ClearSecondDots(); + GainChart.ClearSecondDots(); } public override void MakeDots(int x, int y, double timeInMs) diff --git a/grapher/Models/Charts/ChartXY.cs b/grapher/Models/Charts/ChartXY.cs index d95c7ac..27b63b5 100644 --- a/grapher/Models/Charts/ChartXY.cs +++ b/grapher/Models/Charts/ChartXY.cs @@ -154,6 +154,11 @@ namespace grapher */ } + public void ClearSecondDots() + { + ChartX.Series[3].Points.Clear(); + } + public void Update() { ChartX.Update(); -- cgit v1.2.3 From a7a2f11ab8461fa9a0e5c00fd98fd6843a4b8e9b Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 27 Sep 2020 20:39:05 -0700 Subject: Set tab order --- grapher/Form1.Designer.cs | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index c6a895d..1950f51 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -211,7 +211,7 @@ namespace grapher this.accelTypeDropX.Location = new System.Drawing.Point(105, 110); this.accelTypeDropX.Name = "accelTypeDropX"; this.accelTypeDropX.Size = new System.Drawing.Size(76, 21); - this.accelTypeDropX.TabIndex = 2; + this.accelTypeDropX.TabIndex = 4; this.accelTypeDropX.Text = "Accel Type"; // // sensitivityBoxX @@ -219,7 +219,7 @@ namespace grapher this.sensitivityBoxX.Location = new System.Drawing.Point(105, 46); this.sensitivityBoxX.Name = "sensitivityBoxX"; this.sensitivityBoxX.Size = new System.Drawing.Size(34, 20); - this.sensitivityBoxX.TabIndex = 3; + this.sensitivityBoxX.TabIndex = 0; // // sensitivityLabel // @@ -235,7 +235,7 @@ namespace grapher this.rotationBox.Location = new System.Drawing.Point(105, 72); this.rotationBox.Name = "rotationBox"; this.rotationBox.Size = new System.Drawing.Size(76, 20); - this.rotationBox.TabIndex = 5; + this.rotationBox.TabIndex = 3; // // rotationLabel // @@ -251,7 +251,7 @@ namespace grapher this.accelerationBoxX.Location = new System.Drawing.Point(105, 137); this.accelerationBoxX.Name = "accelerationBoxX"; this.accelerationBoxX.Size = new System.Drawing.Size(76, 20); - this.accelerationBoxX.TabIndex = 7; + this.accelerationBoxX.TabIndex = 5; // // constantOneLabelX // @@ -268,7 +268,7 @@ namespace grapher this.capBoxX.Location = new System.Drawing.Point(105, 163); this.capBoxX.Name = "capBoxX"; this.capBoxX.Size = new System.Drawing.Size(76, 20); - this.capBoxX.TabIndex = 10; + this.capBoxX.TabIndex = 6; // // capLabelX // @@ -285,7 +285,7 @@ namespace grapher this.weightBoxX.Location = new System.Drawing.Point(105, 189); this.weightBoxX.Name = "weightBoxX"; this.weightBoxX.Size = new System.Drawing.Size(76, 20); - this.weightBoxX.TabIndex = 12; + this.weightBoxX.TabIndex = 7; // // weightLabelX // @@ -302,14 +302,14 @@ namespace grapher this.weightBoxY.Location = new System.Drawing.Point(331, 189); this.weightBoxY.Name = "weightBoxY"; this.weightBoxY.Size = new System.Drawing.Size(76, 20); - this.weightBoxY.TabIndex = 14; + this.weightBoxY.TabIndex = 15; // // limitBoxX // this.limitBoxX.Location = new System.Drawing.Point(105, 241); this.limitBoxX.Name = "limitBoxX"; this.limitBoxX.Size = new System.Drawing.Size(76, 20); - this.limitBoxX.TabIndex = 15; + this.limitBoxX.TabIndex = 9; // // constantTwoLabelX // @@ -326,7 +326,7 @@ namespace grapher this.midpointBoxX.Location = new System.Drawing.Point(105, 267); this.midpointBoxX.Name = "midpointBoxX"; this.midpointBoxX.Size = new System.Drawing.Size(76, 20); - this.midpointBoxX.TabIndex = 17; + this.midpointBoxX.TabIndex = 10; // // constantThreeLabelX // @@ -343,7 +343,7 @@ namespace grapher this.offsetBoxX.Location = new System.Drawing.Point(105, 215); this.offsetBoxX.Name = "offsetBoxX"; this.offsetBoxX.Size = new System.Drawing.Size(76, 20); - this.offsetBoxX.TabIndex = 19; + this.offsetBoxX.TabIndex = 8; // // offsetLabelX // @@ -360,7 +360,7 @@ namespace grapher this.writeButton.Location = new System.Drawing.Point(154, 270); this.writeButton.Name = "writeButton"; this.writeButton.Size = new System.Drawing.Size(76, 23); - this.writeButton.TabIndex = 21; + this.writeButton.TabIndex = 19; this.writeButton.Text = "Apply"; this.writeButton.UseVisualStyleBackColor = true; // @@ -369,14 +369,14 @@ namespace grapher this.sensitivityBoxY.Location = new System.Drawing.Point(147, 46); this.sensitivityBoxY.Name = "sensitivityBoxY"; this.sensitivityBoxY.Size = new System.Drawing.Size(34, 20); - this.sensitivityBoxY.TabIndex = 22; + this.sensitivityBoxY.TabIndex = 1; // // capBoxY // this.capBoxY.Location = new System.Drawing.Point(331, 163); this.capBoxY.Name = "capBoxY"; this.capBoxY.Size = new System.Drawing.Size(76, 20); - this.capBoxY.TabIndex = 23; + this.capBoxY.TabIndex = 14; // // sensXYLock // @@ -386,7 +386,7 @@ namespace grapher this.sensXYLock.Location = new System.Drawing.Point(282, 46); this.sensXYLock.Name = "sensXYLock"; this.sensXYLock.Size = new System.Drawing.Size(15, 14); - this.sensXYLock.TabIndex = 24; + this.sensXYLock.TabIndex = 2; this.sensXYLock.UseVisualStyleBackColor = true; // // LockXYLabel @@ -580,7 +580,7 @@ namespace grapher this.gainCapToolStripMenuItem, this.legacyCapToolStripMenuItem}); this.capStyleToolStripMenuItem.Name = "capStyleToolStripMenuItem"; - this.capStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); + this.capStyleToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.capStyleToolStripMenuItem.Text = "Cap Style"; // // gainCapToolStripMenuItem @@ -603,7 +603,7 @@ namespace grapher this.gainOffsetToolStripMenuItem, this.legacyOffsetToolStripMenuItem}); this.offsetStyleToolStripMenuItem.Name = "offsetStyleToolStripMenuItem"; - this.offsetStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); + this.offsetStyleToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.offsetStyleToolStripMenuItem.Text = "Offset Style"; // // gainOffsetToolStripMenuItem @@ -624,7 +624,7 @@ namespace grapher this.wholeVectorToolStripMenuItem, this.byVectorComponentToolStripMenuItem}); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(163, 22); + this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22); this.toolStripMenuItem1.Text = "Application Style"; // // wholeVectorToolStripMenuItem @@ -898,28 +898,28 @@ namespace grapher this.accelerationBoxY.Location = new System.Drawing.Point(331, 137); this.accelerationBoxY.Name = "accelerationBoxY"; this.accelerationBoxY.Size = new System.Drawing.Size(76, 20); - this.accelerationBoxY.TabIndex = 48; + this.accelerationBoxY.TabIndex = 13; // // offsetBoxY // this.offsetBoxY.Location = new System.Drawing.Point(331, 215); this.offsetBoxY.Name = "offsetBoxY"; this.offsetBoxY.Size = new System.Drawing.Size(76, 20); - this.offsetBoxY.TabIndex = 49; + this.offsetBoxY.TabIndex = 16; // // limitBoxY // this.limitBoxY.Location = new System.Drawing.Point(331, 241); this.limitBoxY.Name = "limitBoxY"; this.limitBoxY.Size = new System.Drawing.Size(76, 20); - this.limitBoxY.TabIndex = 50; + this.limitBoxY.TabIndex = 17; // // midpointBoxY // this.midpointBoxY.Location = new System.Drawing.Point(331, 267); this.midpointBoxY.Name = "midpointBoxY"; this.midpointBoxY.Size = new System.Drawing.Size(76, 20); - this.midpointBoxY.TabIndex = 51; + this.midpointBoxY.TabIndex = 18; // // accelTypeDropY // @@ -927,7 +927,7 @@ namespace grapher this.accelTypeDropY.Location = new System.Drawing.Point(331, 110); this.accelTypeDropY.Name = "accelTypeDropY"; this.accelTypeDropY.Size = new System.Drawing.Size(76, 21); - this.accelTypeDropY.TabIndex = 52; + this.accelTypeDropY.TabIndex = 12; this.accelTypeDropY.Text = "Accel Type"; // // AccelerationActiveLabelY @@ -974,7 +974,7 @@ namespace grapher this.ByComponentXYLock.Location = new System.Drawing.Point(282, 93); this.ByComponentXYLock.Name = "ByComponentXYLock"; this.ByComponentXYLock.Size = new System.Drawing.Size(15, 14); - this.ByComponentXYLock.TabIndex = 57; + this.ByComponentXYLock.TabIndex = 11; this.ByComponentXYLock.UseVisualStyleBackColor = true; // // constantOneLabelY -- cgit v1.2.3 From 8bd843469200582e087c45e9bd8cda46ba88df26 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 27 Sep 2020 21:25:05 -0700 Subject: Fix tab behavior --- grapher/Form1.Designer.cs | 48 ++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index 8d7bfd8..2ecdd95 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -210,6 +210,7 @@ namespace grapher this.AccelerationChart.Series.Add(series4); this.AccelerationChart.Size = new System.Drawing.Size(698, 328); this.AccelerationChart.TabIndex = 0; + this.AccelerationChart.TabStop = false; this.AccelerationChart.Text = "Sensitivity"; title1.DockedToChartArea = "ChartArea1"; title1.IsDockedInsideChartArea = false; @@ -280,7 +281,7 @@ namespace grapher this.capBoxX.Location = new System.Drawing.Point(105, 163); this.capBoxX.Name = "capBoxX"; this.capBoxX.Size = new System.Drawing.Size(76, 20); - this.capBoxX.TabIndex = 6; + this.capBoxX.TabIndex = 7; // // capLabelX // @@ -297,7 +298,7 @@ namespace grapher this.weightBoxX.Location = new System.Drawing.Point(105, 189); this.weightBoxX.Name = "weightBoxX"; this.weightBoxX.Size = new System.Drawing.Size(76, 20); - this.weightBoxX.TabIndex = 7; + this.weightBoxX.TabIndex = 8; // // weightLabelX // @@ -314,14 +315,14 @@ namespace grapher this.weightBoxY.Location = new System.Drawing.Point(331, 189); this.weightBoxY.Name = "weightBoxY"; this.weightBoxY.Size = new System.Drawing.Size(76, 20); - this.weightBoxY.TabIndex = 15; + this.weightBoxY.TabIndex = 18; // // limitBoxX // this.limitBoxX.Location = new System.Drawing.Point(105, 241); this.limitBoxX.Name = "limitBoxX"; this.limitBoxX.Size = new System.Drawing.Size(76, 20); - this.limitBoxX.TabIndex = 9; + this.limitBoxX.TabIndex = 10; // // limitLabelX // @@ -338,7 +339,7 @@ namespace grapher this.midpointBoxX.Location = new System.Drawing.Point(105, 297); this.midpointBoxX.Name = "midpointBoxX"; this.midpointBoxX.Size = new System.Drawing.Size(76, 20); - this.midpointBoxX.TabIndex = 10; + this.midpointBoxX.TabIndex = 12; // // constantThreeLabelX // @@ -355,7 +356,7 @@ namespace grapher this.offsetBoxX.Location = new System.Drawing.Point(105, 215); this.offsetBoxX.Name = "offsetBoxX"; this.offsetBoxX.Size = new System.Drawing.Size(76, 20); - this.offsetBoxX.TabIndex = 8; + this.offsetBoxX.TabIndex = 9; // // offsetLabelX // @@ -373,7 +374,7 @@ namespace grapher this.writeButton.Location = new System.Drawing.Point(177, 359); this.writeButton.Name = "writeButton"; this.writeButton.Size = new System.Drawing.Size(128, 40); - this.writeButton.TabIndex = 19; + this.writeButton.TabIndex = 23; this.writeButton.Text = "Apply"; this.writeButton.UseVisualStyleBackColor = true; // @@ -389,7 +390,7 @@ namespace grapher this.capBoxY.Location = new System.Drawing.Point(331, 163); this.capBoxY.Name = "capBoxY"; this.capBoxY.Size = new System.Drawing.Size(76, 20); - this.capBoxY.TabIndex = 14; + this.capBoxY.TabIndex = 17; // // sensXYLock // @@ -445,6 +446,7 @@ namespace grapher this.VelocityChart.Series.Add(series8); this.VelocityChart.Size = new System.Drawing.Size(698, 307); this.VelocityChart.TabIndex = 28; + this.VelocityChart.TabStop = false; this.VelocityChart.Text = "chart1"; title2.DockedToChartArea = "ChartArea1"; title2.IsDockedInsideChartArea = false; @@ -486,6 +488,7 @@ namespace grapher this.GainChart.Series.Add(series12); this.GainChart.Size = new System.Drawing.Size(698, 309); this.GainChart.TabIndex = 29; + this.GainChart.TabStop = false; this.GainChart.Text = "chart1"; title3.DockedToChartArea = "ChartArea1"; title3.IsDockedInsideChartArea = false; @@ -593,7 +596,7 @@ namespace grapher this.gainCapToolStripMenuItem, this.legacyCapToolStripMenuItem}); this.capStyleToolStripMenuItem.Name = "capStyleToolStripMenuItem"; - this.capStyleToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.capStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); this.capStyleToolStripMenuItem.Text = "Cap Style"; // // gainCapToolStripMenuItem @@ -616,7 +619,7 @@ namespace grapher this.gainOffsetToolStripMenuItem, this.legacyOffsetToolStripMenuItem}); this.offsetStyleToolStripMenuItem.Name = "offsetStyleToolStripMenuItem"; - this.offsetStyleToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.offsetStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); this.offsetStyleToolStripMenuItem.Text = "Offset Style"; // // gainOffsetToolStripMenuItem @@ -637,7 +640,7 @@ namespace grapher this.wholeVectorToolStripMenuItem, this.byVectorComponentToolStripMenuItem}); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22); + this.toolStripMenuItem1.Size = new System.Drawing.Size(163, 22); this.toolStripMenuItem1.Text = "Application Style"; // // wholeVectorToolStripMenuItem @@ -701,6 +704,7 @@ namespace grapher this.AccelerationChartY.Series.Add(series15); this.AccelerationChartY.Size = new System.Drawing.Size(698, 328); this.AccelerationChartY.TabIndex = 31; + this.AccelerationChartY.TabStop = false; this.AccelerationChartY.Text = "chart1"; title4.DockedToChartArea = "ChartArea1"; title4.IsDockedInsideChartArea = false; @@ -737,6 +741,7 @@ namespace grapher this.VelocityChartY.Series.Add(series18); this.VelocityChartY.Size = new System.Drawing.Size(698, 307); this.VelocityChartY.TabIndex = 32; + this.VelocityChartY.TabStop = false; this.VelocityChartY.Text = "chart1"; title5.DockedToChartArea = "ChartArea1"; title5.IsDockedInsideChartArea = false; @@ -773,6 +778,7 @@ namespace grapher this.GainChartY.Series.Add(series21); this.GainChartY.Size = new System.Drawing.Size(698, 309); this.GainChartY.TabIndex = 33; + this.GainChartY.TabStop = false; this.GainChartY.Text = "chart1"; title6.DockedToChartArea = "ChartArea1"; title6.IsDockedInsideChartArea = false; @@ -911,28 +917,28 @@ namespace grapher this.accelerationBoxY.Location = new System.Drawing.Point(331, 137); this.accelerationBoxY.Name = "accelerationBoxY"; this.accelerationBoxY.Size = new System.Drawing.Size(76, 20); - this.accelerationBoxY.TabIndex = 13; + this.accelerationBoxY.TabIndex = 15; // // offsetBoxY // this.offsetBoxY.Location = new System.Drawing.Point(331, 215); this.offsetBoxY.Name = "offsetBoxY"; this.offsetBoxY.Size = new System.Drawing.Size(76, 20); - this.offsetBoxY.TabIndex = 16; + this.offsetBoxY.TabIndex = 19; // // limitBoxY // this.limitBoxY.Location = new System.Drawing.Point(331, 241); this.limitBoxY.Name = "limitBoxY"; this.limitBoxY.Size = new System.Drawing.Size(76, 20); - this.limitBoxY.TabIndex = 17; + this.limitBoxY.TabIndex = 20; // // midpointBoxY // this.midpointBoxY.Location = new System.Drawing.Point(331, 297); this.midpointBoxY.Name = "midpointBoxY"; this.midpointBoxY.Size = new System.Drawing.Size(76, 20); - this.midpointBoxY.TabIndex = 18; + this.midpointBoxY.TabIndex = 22; // // accelTypeDropY // @@ -940,7 +946,7 @@ namespace grapher this.accelTypeDropY.Location = new System.Drawing.Point(331, 110); this.accelTypeDropY.Name = "accelTypeDropY"; this.accelTypeDropY.Size = new System.Drawing.Size(76, 21); - this.accelTypeDropY.TabIndex = 12; + this.accelTypeDropY.TabIndex = 14; this.accelTypeDropY.Text = "Accel Type"; // // AccelerationActiveLabelY @@ -987,7 +993,7 @@ namespace grapher this.ByComponentXYLock.Location = new System.Drawing.Point(282, 93); this.ByComponentXYLock.Name = "ByComponentXYLock"; this.ByComponentXYLock.Size = new System.Drawing.Size(15, 14); - this.ByComponentXYLock.TabIndex = 11; + this.ByComponentXYLock.TabIndex = 13; this.ByComponentXYLock.UseVisualStyleBackColor = true; // // constantOneLabelY @@ -1103,7 +1109,7 @@ namespace grapher this.expBoxY.Location = new System.Drawing.Point(331, 270); this.expBoxY.Name = "expBoxY"; this.expBoxY.Size = new System.Drawing.Size(76, 20); - this.expBoxY.TabIndex = 71; + this.expBoxY.TabIndex = 21; // // ExpActiveXLabel // @@ -1129,7 +1135,7 @@ namespace grapher this.expBoxX.Location = new System.Drawing.Point(105, 270); this.expBoxX.Name = "expBoxX"; this.expBoxX.Size = new System.Drawing.Size(76, 20); - this.expBoxX.TabIndex = 68; + this.expBoxX.TabIndex = 11; // // scaleLabelY // @@ -1154,7 +1160,7 @@ namespace grapher this.scaleBoxY.Location = new System.Drawing.Point(331, 327); this.scaleBoxY.Name = "scaleBoxY"; this.scaleBoxY.Size = new System.Drawing.Size(76, 20); - this.scaleBoxY.TabIndex = 77; + this.scaleBoxY.TabIndex = 16; // // ScaleActiveXLabel // @@ -1180,7 +1186,7 @@ namespace grapher this.scaleBoxX.Location = new System.Drawing.Point(105, 327); this.scaleBoxX.Name = "scaleBoxX"; this.scaleBoxX.Size = new System.Drawing.Size(76, 20); - this.scaleBoxX.TabIndex = 74; + this.scaleBoxX.TabIndex = 6; // // RawAcceleration // -- cgit v1.2.3 From 7ccdb78b8c059de31e5b568b43f4547142d9aeb4 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 27 Sep 2020 21:42:48 -0700 Subject: Handle errors from bad arg on write --- grapher/Models/AccelGUI.cs | 3 +-- grapher/Models/Serialized/SettingsManager.cs | 29 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index c9c4ed0..15a0c0e 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -3,7 +3,6 @@ using grapher.Models.Mouse; using grapher.Models.Options; using grapher.Models.Serialized; using System; -using System.Drawing; using System.Windows.Forms; namespace grapher @@ -97,7 +96,7 @@ namespace grapher } else { - WriteButton.Text = "bad args"; + throw new Exception($"Bad arguments: \n {SettingsManager.ErrorStringFrom(errors)}"); } } diff --git a/grapher/Models/Serialized/SettingsManager.cs b/grapher/Models/Serialized/SettingsManager.cs index 93cf42b..416823e 100644 --- a/grapher/Models/Serialized/SettingsManager.cs +++ b/grapher/Models/Serialized/SettingsManager.cs @@ -2,6 +2,7 @@ using System; using System.Windows.Forms; using System.Threading; +using System.Text; namespace grapher.Models.Serialized { @@ -47,6 +48,34 @@ namespace grapher.Models.Serialized #region Methods + public static string ErrorStringFrom(SettingsErrors errors) + { + StringBuilder builder = new StringBuilder(); + bool yPresent = errors.y?.Count > 0; + + if (yPresent) + { + builder.AppendLine("\nx:"); + } + + foreach (var error in errors.x) + { + builder.AppendLine(error); + } + + if (yPresent) + { + builder.AppendLine("\ny:"); + + foreach (var error in errors.y) + { + builder.AppendLine(error); + } + } + + return builder.ToString(); + } + public SettingsErrors TryUpdateActiveSettings(DriverSettings settings) { var errors = TryUpdateAccel(settings); -- cgit v1.2.3 From 9ea8c510e33f43981cff95a9512a3fc2303f1c1b Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 27 Sep 2020 22:05:48 -0700 Subject: Show MessageBox with exception on driver not installed --- grapher/Form1.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grapher/Form1.cs b/grapher/Form1.cs index 6f61c65..a1d43b3 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -32,8 +32,9 @@ namespace grapher { activeAccel = ManagedAccel.GetActiveAccel(); } - catch (DriverNotInstalledException) + catch (DriverNotInstalledException ex) { + MessageBox.Show($"Driver not installed.\n\n {ex.ToString()}"); throw; } -- cgit v1.2.3 From 554422cb1f2271252e35b1ace297864a4553abba Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 27 Sep 2020 22:30:50 -0700 Subject: Fix legacy offset bugs --- grapher/Models/Options/OffsetOptions.cs | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/grapher/Models/Options/OffsetOptions.cs b/grapher/Models/Options/OffsetOptions.cs index c6bee75..6638ed7 100644 --- a/grapher/Models/Options/OffsetOptions.cs +++ b/grapher/Models/Options/OffsetOptions.cs @@ -31,33 +31,11 @@ namespace grapher.Models.Options public bool IsLegacy { get; private set; } - public double LegacyOffset - { - get - { - if (IsLegacy) - { - return OffsetOption.Field.Data; - } - else - { - return 0; - } - } - } - public double Offset { get { - if (IsLegacy) - { - return 0; - } - else - { - return OffsetOption.Field.Data; - } + return OffsetOption.Field.Data; } } @@ -131,6 +109,9 @@ namespace grapher.Models.Options public void SetActiveValue(double offset, bool legacy) { OffsetOption.SetActiveValue(offset); + + VelocityGainOffsetCheck.Checked = !legacy; + LegacyOffsetCheck.Checked = legacy; } public override void AlignActiveValues() -- cgit v1.2.3