diff options
| author | Jacob Palecki <[email protected]> | 2020-09-22 14:53:48 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-22 14:53:48 -0700 |
| commit | 8ec99b8518f99e57830c2a95d5e8805e3e947294 (patch) | |
| tree | c8eddc479fd82097a0fb6cdd50010001435b0630 | |
| parent | Rename write button (diff) | |
| download | rawaccel-8ec99b8518f99e57830c2a95d5e8805e3e947294.tar.xz rawaccel-8ec99b8518f99e57830c2a95d5e8805e3e947294.zip | |
Save option to show velocity and gain on gui startup
| -rw-r--r-- | grapher/Models/AccelGUIFactory.cs | 3 | ||||
| -rw-r--r-- | grapher/Models/Serialized/GUISettings.cs | 3 | ||||
| -rw-r--r-- | grapher/Models/Serialized/SettingsManager.cs | 8 |
3 files changed, 12 insertions, 2 deletions
diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index eb30864..d986369 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -286,7 +286,8 @@ namespace grapher.Models accelCalculator.DPI, accelCalculator.PollRate, autoWriteMenuItem, - showLastMouseMoveMenuItem); + showLastMouseMoveMenuItem, + showVelocityGainToolStripMenuItem); return new AccelGUI( form, diff --git a/grapher/Models/Serialized/GUISettings.cs b/grapher/Models/Serialized/GUISettings.cs index 2543104..84e681b 100644 --- a/grapher/Models/Serialized/GUISettings.cs +++ b/grapher/Models/Serialized/GUISettings.cs @@ -33,6 +33,9 @@ namespace grapher.Models.Serialized [JsonProperty(Order = 4)] public bool ShowLastMouseMove { get; set; } + [JsonProperty(Order = 4)] + public bool ShowVelocityAndGain { get; set; } + #endregion Properties } } diff --git a/grapher/Models/Serialized/SettingsManager.cs b/grapher/Models/Serialized/SettingsManager.cs index ccffc3f..cac2bd0 100644 --- a/grapher/Models/Serialized/SettingsManager.cs +++ b/grapher/Models/Serialized/SettingsManager.cs @@ -13,13 +13,15 @@ namespace grapher.Models.Serialized Field dpiField, Field pollRateField, ToolStripMenuItem autoWrite, - ToolStripMenuItem showLastMouseMove) + ToolStripMenuItem showLastMouseMove, + ToolStripMenuItem showVelocityAndGain) { ActiveAccel = activeAccel; DpiField = dpiField; PollRateField = pollRateField; AutoWriteMenuItem = autoWrite; ShowLastMouseMoveMenuItem = showLastMouseMove; + ShowVelocityAndGainMoveMenuItem = showVelocityAndGain; } #endregion Constructors @@ -38,6 +40,8 @@ namespace grapher.Models.Serialized private ToolStripMenuItem ShowLastMouseMoveMenuItem { get; set; } + private ToolStripMenuItem ShowVelocityAndGainMoveMenuItem { get; set; } + #endregion Properties #region Methods @@ -53,6 +57,7 @@ namespace grapher.Models.Serialized DPI = (int)DpiField.Data, PollRate = (int)PollRateField.Data, ShowLastMouseMove = ShowLastMouseMoveMenuItem.Checked, + ShowVelocityAndGain = ShowVelocityAndGainMoveMenuItem.Checked, }; RawAccelSettings.Save(); @@ -69,6 +74,7 @@ namespace grapher.Models.Serialized PollRateField.SetToEntered(RawAccelSettings.GUISettings.PollRate); AutoWriteMenuItem.Checked = RawAccelSettings.GUISettings.AutoWriteToDriverOnStartup; ShowLastMouseMoveMenuItem.Checked = RawAccelSettings.GUISettings.ShowLastMouseMove; + ShowVelocityAndGainMoveMenuItem.Checked = RawAccelSettings.GUISettings.ShowVelocityAndGain; } public void Startup() |