From c5987ac1e233e1093485d38154d8896e4bb6ee44 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Mon, 5 Oct 2020 23:14:21 -0400 Subject: [PATCH 01/10] improve installer + docs improve exception handling add link to vcr redist in install section of guide --- doc/Guide.md | 4 +++- installer/installer.cpp | 5 ++++- uninstaller/uninstaller.cpp | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/Guide.md b/doc/Guide.md index 5f18e021..c3498ac1 100644 --- a/doc/Guide.md +++ b/doc/Guide.md @@ -1,7 +1,9 @@ # Raw Accel Guide ## Installation -Run `installer.exe` in the release directory to install the Raw Accel driver. Restart your computer for the installation to take effect. + +Run `installer.exe` in the release directory to install the Raw Accel driver. Restart your computer for the installation to take effect. +* If you encounter a `VCRUNTIME` related system error, [download and install the latest version from Microsoft.](https://aka.ms/vs/16/release/vc_redist.x64.exe) Run `uninstaller.exe` in the release directory to uninstall the driver. Restart for the uninstallation to take effect. diff --git a/installer/installer.cpp b/installer/installer.cpp index 03c8881c..06f234e6 100644 --- a/installer/installer.cpp +++ b/installer/installer.cpp @@ -76,7 +76,10 @@ int main() { std::cout << "Install complete, change will take effect after restart.\n"; } - catch (std::exception e) { + catch (const std::system_error& e) { + std::cerr << "Error: " << e.what() << ' ' << e.code() << '\n'; + } + catch (const std::exception& e) { std::cerr << "Error: " << e.what() << '\n'; } diff --git a/uninstaller/uninstaller.cpp b/uninstaller/uninstaller.cpp index 4d02715f..8d9e8905 100644 --- a/uninstaller/uninstaller.cpp +++ b/uninstaller/uninstaller.cpp @@ -20,7 +20,10 @@ int main() { } std::cout << "Removal complete, change will take effect after restart.\n"; } - catch (std::exception e) { + catch (const std::system_error& e) { + std::cerr << "Error: " << e.what() << ' ' << e.code() << '\n'; + } + catch (const std::exception& e) { std::cerr << "Error: " << e.what() << '\n'; } From 6dbeca0806f32fae5a8fb4a27465bea46e22d58d Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Tue, 6 Oct 2020 00:19:56 -0400 Subject: [PATCH 02/10] add static default settings in wrapper --- grapher/Models/Options/AccelTypeOptions.cs | 2 +- wrapper/wrapper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index f9ecac15..4410a127 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -227,7 +227,7 @@ public void ShowShortened() public void SetArgs(ref AccelArgs args) { - AccelArgs defaults = (AccelArgs)DriverInterop.DefaultArgs; + AccelArgs defaults = DriverInterop.DefaultSettings.args.x; args.acceleration = Acceleration.Visible ? Acceleration.Field.Data : defaults.acceleration; args.scale = Scale.Visible ? Scale.Field.Data : defaults.scale; args.gainCap = Cap.Visible ? Cap.VelocityGainCap : defaults.gainCap; diff --git a/wrapper/wrapper.cpp b/wrapper/wrapper.cpp index a8fc0fb8..d1f0e092 100644 --- a/wrapper/wrapper.cpp +++ b/wrapper/wrapper.cpp @@ -177,7 +177,7 @@ public ref class SettingsErrors public ref struct DriverInterop { literal double WriteDelayMs = WRITE_DELAY; - static initonly AccelArgs^ DefaultArgs = get_default()->args.x; + static initonly DriverSettings^ DefaultSettings = get_default(); static DriverSettings^ GetActiveSettings() { From 187de539ea370210146c7f1bcf398c2a100f758f Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Tue, 6 Oct 2020 02:54:27 -0400 Subject: [PATCH 03/10] ease requirements for loading driver settings gui settings are no longer needed this covers edge case where interaccel converter is used but the gui does not run until after reboot --- grapher/Models/Serialized/RawAccelSettings.cs | 29 ++++++++++++++--- grapher/Models/Serialized/SettingsManager.cs | 32 +++++++++---------- 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/grapher/Models/Serialized/RawAccelSettings.cs b/grapher/Models/Serialized/RawAccelSettings.cs index 570a6c8b..6f48d443 100644 --- a/grapher/Models/Serialized/RawAccelSettings.cs +++ b/grapher/Models/Serialized/RawAccelSettings.cs @@ -44,17 +44,36 @@ public RawAccelSettings( #region Methods - public static RawAccelSettings Load() + public static RawAccelSettings Load(Func DefaultGUISettingsSupplier) { - return Load(DefaultSettingsFile); + return Load(DefaultSettingsFile, DefaultGUISettingsSupplier); } - public static RawAccelSettings Load(string file) + public static RawAccelSettings Load(string file, Func DefaultGUISettingsSupplier) { try { - var settings = JsonConvert.DeserializeObject(File.ReadAllText(file), SerializerSettings); - if (settings is null) throw new JsonException($"{file} contains invalid JSON"); + RawAccelSettings settings = null; + + JObject jo = JObject.Parse(File.ReadAllText(file)); + if (jo.ContainsKey(DriverSettings.Key)) + { + settings = jo.ToObject(JsonSerializer.Create(SerializerSettings)); + } + else + { + settings = new RawAccelSettings + { + AccelerationSettings = jo.ToObject(), + GUISettings = DefaultGUISettingsSupplier() + }; + } + + if (settings is null || settings.AccelerationSettings is null) + { + throw new JsonException($"{file} contains invalid JSON"); + } + return settings; } catch (FileNotFoundException e) diff --git a/grapher/Models/Serialized/SettingsManager.cs b/grapher/Models/Serialized/SettingsManager.cs index 416823e4..f53c9c95 100644 --- a/grapher/Models/Serialized/SettingsManager.cs +++ b/grapher/Models/Serialized/SettingsManager.cs @@ -83,15 +83,7 @@ public SettingsErrors TryUpdateActiveSettings(DriverSettings settings) if (errors.Empty()) { RawAccelSettings.AccelerationSettings = settings; - RawAccelSettings.GUISettings = new GUISettings - { - AutoWriteToDriverOnStartup = AutoWriteMenuItem.Checked, - DPI = (int)DpiField.Data, - PollRate = (int)PollRateField.Data, - ShowLastMouseMove = ShowLastMouseMoveMenuItem.Checked, - ShowVelocityAndGain = ShowVelocityAndGainMoveMenuItem.Checked, - }; - + RawAccelSettings.GUISettings = MakeGUISettingsFromFields(); RawAccelSettings.Save(); } @@ -128,13 +120,25 @@ public static SettingsErrors SendToDriverSafe(DriverSettings settings) return errors; } + public GUISettings MakeGUISettingsFromFields() + { + return new GUISettings + { + AutoWriteToDriverOnStartup = AutoWriteMenuItem.Checked, + DPI = (int)DpiField.Data, + PollRate = (int)PollRateField.Data, + ShowLastMouseMove = ShowLastMouseMoveMenuItem.Checked, + ShowVelocityAndGain = ShowVelocityAndGainMoveMenuItem.Checked + }; + } + public void Startup() { if (RawAccelSettings.Exists()) { try { - RawAccelSettings = RawAccelSettings.Load(); + RawAccelSettings = RawAccelSettings.Load(() => MakeGUISettingsFromFields()); if (RawAccelSettings.GUISettings.AutoWriteToDriverOnStartup) { UpdateActiveAccelFromFileSettings(RawAccelSettings.AccelerationSettings); @@ -149,13 +153,7 @@ public void Startup() RawAccelSettings = new RawAccelSettings( DriverInterop.GetActiveSettings(), - new GUISettings - { - AutoWriteToDriverOnStartup = AutoWriteMenuItem.Checked, - DPI = (int)DpiField.Data, - PollRate = (int)PollRateField.Data, - ShowLastMouseMove = ShowLastMouseMoveMenuItem.Checked, - }); + MakeGUISettingsFromFields()); RawAccelSettings.Save(); } From 2be0106211cb4ce30036fc0c8e84ae70dff68c87 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 8 Oct 2020 02:07:56 -0400 Subject: [PATCH 04/10] add toggle button + save gui settings on close remove option to disable write on startup --- grapher/Constants/Constants.cs | 7 +- grapher/Form1.Designer.cs | 48 +++--- grapher/Form1.cs | 2 +- grapher/Layouts/DefaultLayout.cs | 1 - grapher/Layouts/LayoutBase.cs | 4 - grapher/Layouts/OffLayout.cs | 1 - grapher/Models/AccelGUI.cs | 150 ++++++++++++++---- grapher/Models/AccelGUIFactory.cs | 4 +- grapher/Models/Charts/AccelCharts.cs | 4 +- grapher/Models/Serialized/GUISettings.cs | 27 ++-- grapher/Models/Serialized/RawAccelSettings.cs | 12 ++ grapher/Models/Serialized/SettingsManager.cs | 22 ++- 12 files changed, 184 insertions(+), 98 deletions(-) diff --git a/grapher/Constants/Constants.cs b/grapher/Constants/Constants.cs index b41ffa28..639bd9b9 100644 --- a/grapher/Constants/Constants.cs +++ b/grapher/Constants/Constants.cs @@ -58,7 +58,7 @@ public static class Constants public const int NarrowChartLeft = 482; /// Vertical placement of write button above bottom of sensitivity graph - public const int WriteButtonVerticalOffset = 80; + public const int ButtonVerticalOffset = 60; /// Format string for shortened x and y textboxes. public const string ShortenedFormatString = "0.###"; @@ -85,7 +85,10 @@ public static class Constants public const string WriteButtonDefaultText = "Apply"; /// Default text to be displayed on write button. - public const string WriteButtonDelayText = "Delay"; + public const string ToggleButtonDefaultText = "Toggle"; + + /// Default text to be displayed on write button. + public const string ButtonDelayText = "Delay"; /// Title of sensitivity chart. public const string SensitivityChartTitle = "Sensitivity"; diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index b8b1c8fc..c2d77c9d 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -116,8 +116,6 @@ private void InitializeComponent() this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.wholeVectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.byVectorComponentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.startupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.AutoWriteMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.AccelerationChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.VelocityChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.GainChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); @@ -167,6 +165,7 @@ private void InitializeComponent() this.ScaleActiveXLabel = new System.Windows.Forms.Label(); this.scaleLabelX = new System.Windows.Forms.Label(); this.scaleBoxX = new System.Windows.Forms.TextBox(); + this.toggleButton = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.AccelerationChart)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.VelocityChart)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.GainChart)).BeginInit(); @@ -371,9 +370,9 @@ private void InitializeComponent() // writeButton // this.writeButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.writeButton.Location = new System.Drawing.Point(177, 359); + this.writeButton.Location = new System.Drawing.Point(103, 377); this.writeButton.Name = "writeButton"; - this.writeButton.Size = new System.Drawing.Size(128, 40); + this.writeButton.Size = new System.Drawing.Size(92, 35); this.writeButton.TabIndex = 23; this.writeButton.Text = "Apply"; this.writeButton.UseVisualStyleBackColor = true; @@ -501,8 +500,7 @@ private void InitializeComponent() this.menuStrip1.BackColor = System.Drawing.SystemColors.ControlLight; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.graphsToolStripMenuItem, - this.advancedToolStripMenuItem, - this.startupToolStripMenuItem}); + this.advancedToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(1884, 24); @@ -528,7 +526,7 @@ private void InitializeComponent() this.pollRateToolStripMenuItem, this.ScaleMenuItem}); this.scaleByDPIToolStripMenuItem.Name = "scaleByDPIToolStripMenuItem"; - this.scaleByDPIToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.scaleByDPIToolStripMenuItem.Size = new System.Drawing.Size(201, 22); this.scaleByDPIToolStripMenuItem.Text = "Scale by Mouse Settings"; // // dPIToolStripMenuItem @@ -568,7 +566,7 @@ private void InitializeComponent() // showVelocityGainToolStripMenuItem // this.showVelocityGainToolStripMenuItem.Name = "showVelocityGainToolStripMenuItem"; - this.showVelocityGainToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.showVelocityGainToolStripMenuItem.Size = new System.Drawing.Size(201, 22); this.showVelocityGainToolStripMenuItem.Text = "Show Velocity && Gain"; // // showLastMouseMoveToolStripMenuItem @@ -577,7 +575,7 @@ private void InitializeComponent() this.showLastMouseMoveToolStripMenuItem.CheckOnClick = true; this.showLastMouseMoveToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.showLastMouseMoveToolStripMenuItem.Name = "showLastMouseMoveToolStripMenuItem"; - this.showLastMouseMoveToolStripMenuItem.Size = new System.Drawing.Size(199, 22); + this.showLastMouseMoveToolStripMenuItem.Size = new System.Drawing.Size(201, 22); this.showLastMouseMoveToolStripMenuItem.Text = "Show Last Mouse Move"; // // advancedToolStripMenuItem @@ -658,23 +656,6 @@ private void InitializeComponent() this.byVectorComponentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.byVectorComponentToolStripMenuItem.Text = "By Component"; // - // startupToolStripMenuItem - // - this.startupToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.AutoWriteMenuItem}); - this.startupToolStripMenuItem.Name = "startupToolStripMenuItem"; - this.startupToolStripMenuItem.Size = new System.Drawing.Size(57, 20); - this.startupToolStripMenuItem.Text = "Startup"; - // - // AutoWriteMenuItem - // - this.AutoWriteMenuItem.Checked = true; - this.AutoWriteMenuItem.CheckOnClick = true; - this.AutoWriteMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.AutoWriteMenuItem.Name = "AutoWriteMenuItem"; - this.AutoWriteMenuItem.Size = new System.Drawing.Size(229, 22); - this.AutoWriteMenuItem.Text = "Apply Settings File on Startup"; - // // AccelerationChartY // chartArea4.AxisX.Title = "Input Speed (counts/ms)"; @@ -1188,11 +1169,21 @@ private void InitializeComponent() this.scaleBoxX.Size = new System.Drawing.Size(76, 20); this.scaleBoxX.TabIndex = 6; // + // toggleButton + // + this.toggleButton.Location = new System.Drawing.Point(223, 384); + this.toggleButton.Name = "toggleButton"; + this.toggleButton.Size = new System.Drawing.Size(104, 24); + this.toggleButton.TabIndex = 24; + this.toggleButton.Text = "toggle"; + this.toggleButton.UseVisualStyleBackColor = true; + // // RawAcceleration // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1884, 956); + this.Controls.Add(this.toggleButton); this.Controls.Add(this.scaleLabelY); this.Controls.Add(this.ScaleActiveYLabel); this.Controls.Add(this.scaleBoxY); @@ -1308,7 +1299,6 @@ private void InitializeComponent() private System.Windows.Forms.Label constantThreeLabelX; private System.Windows.Forms.TextBox offsetBoxX; private System.Windows.Forms.Label offsetLabelX; - private System.Windows.Forms.Button writeButton; private System.Windows.Forms.TextBox sensitivityBoxY; private System.Windows.Forms.TextBox capBoxY; private System.Windows.Forms.CheckBox sensXYLock; @@ -1345,8 +1335,6 @@ private void InitializeComponent() private System.Windows.Forms.Label OffsetActiveXLabel; private System.Windows.Forms.Label LimitActiveXLabel; private System.Windows.Forms.Label MidpointActiveXLabel; - private System.Windows.Forms.ToolStripMenuItem startupToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem AutoWriteMenuItem; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem wholeVectorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem byVectorComponentToolStripMenuItem; @@ -1386,6 +1374,8 @@ private void InitializeComponent() private System.Windows.Forms.Label ScaleActiveXLabel; private System.Windows.Forms.Label scaleLabelX; private System.Windows.Forms.TextBox scaleBoxX; + private System.Windows.Forms.CheckBox toggleButton; + private System.Windows.Forms.Button writeButton; } } diff --git a/grapher/Form1.cs b/grapher/Form1.cs index a1d43b39..91cc4e2a 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -50,6 +50,7 @@ public RawAcceleration() accelTypeDropX, accelTypeDropY, writeButton, + toggleButton, showVelocityGainToolStripMenuItem, showLastMouseMoveToolStripMenuItem, wholeVectorToolStripMenuItem, @@ -58,7 +59,6 @@ public RawAcceleration() legacyCapToolStripMenuItem, gainOffsetToolStripMenuItem, legacyOffsetToolStripMenuItem, - AutoWriteMenuItem, ScaleMenuItem, DPITextBox, PollRateTextBox, diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index c8cce6d8..c2f7fd70 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -9,7 +9,6 @@ public DefaultLayout() { Name = "Default"; Index = (int)AccelMode.noaccel; - ButtonEnabled = false; LogarithmicCharts = false; AccelLayout = new OptionLayout(true, Acceleration); diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index c380397b..7ed08ef3 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -26,7 +26,6 @@ public LayoutBase() ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); - ButtonEnabled = true; LogarithmicCharts = false; } @@ -40,8 +39,6 @@ public LayoutBase() public bool LogarithmicCharts { get; protected set; } - protected bool ButtonEnabled { get; set; } - protected OptionLayout AccelLayout { get; set; } protected OptionLayout ScaleLayout { get; set; } @@ -70,7 +67,6 @@ public void Layout( Button button, int top) { - button.Enabled = ButtonEnabled; IOption previous = null; diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index 664e3647..0b54cbb8 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -9,7 +9,6 @@ public OffLayout() { Name = "Off"; Index = (int)AccelMode.noaccel; - ButtonEnabled = true; LogarithmicCharts = false; AccelLayout = new OptionLayout(false, string.Empty); diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 11685ee0..c561b232 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -3,7 +3,9 @@ using grapher.Models.Options; using grapher.Models.Serialized; using System; +using System.Drawing; using System.Windows.Forms; +using System.Windows.Forms.DataVisualization.Charting; namespace grapher { @@ -19,6 +21,7 @@ public AccelGUI( SettingsManager settings, ApplyOptions applyOptions, Button writeButton, + ButtonBase toggleButton, MouseWatcher mouseWatcher, ToolStripMenuItem scaleMenuItem) { @@ -27,19 +30,28 @@ public AccelGUI( AccelCharts = accelCharts; ApplyOptions = applyOptions; WriteButton = writeButton; + ToggleButton = (CheckBox)toggleButton; ScaleMenuItem = scaleMenuItem; Settings = settings; Settings.Startup(); - RefreshOnRead(); + RefreshOnRead(Settings.RawAccelSettings.AccelerationSettings); + + DefaultButtonFont = WriteButton.Font; + SmallButtonFont = new Font(WriteButton.Font.Name, WriteButton.Font.Size * 0.666f); MouseWatcher = mouseWatcher; ScaleMenuItem.Click += new System.EventHandler(OnScaleMenuItemClick); WriteButton.Click += new System.EventHandler(OnWriteButtonClick); + ToggleButton.Click += new System.EventHandler(OnToggleButtonClick); + AccelForm.FormClosing += new FormClosingEventHandler(SaveGUISettingsOnClose); + + ButtonTimerInterval = Convert.ToInt32(DriverInterop.WriteDelayMs); + ButtonTimer = new Timer(); + ButtonTimer.Tick += new System.EventHandler(OnButtonTimerTick); + SetupButtons(); - ButtonTimer = SetupButtonTimer(); ChartRefresh = SetupChartTimer(); - SetupWriteButton(); } #endregion Constructors @@ -58,6 +70,8 @@ public AccelGUI( public Button WriteButton { get; } + public CheckBox ToggleButton { get; } + public Timer ButtonTimer { get; } public MouseWatcher MouseWatcher { get; } @@ -66,10 +80,30 @@ public AccelGUI( private Timer ChartRefresh { get; } + private Font SmallButtonFont { get; } + + private Font DefaultButtonFont { get; } + + private bool SettingsNotDefault { get; set; } + + private bool LastToggleChecked { get; set; } + + private int ButtonTimerInterval { get; } + #endregion Properties #region Methods + private void SaveGUISettingsOnClose(Object sender, FormClosingEventArgs e) + { + var guiSettings = Settings.MakeGUISettingsFromFields(); + if (!Settings.RawAccelSettings.GUISettings.ValueEquals(guiSettings)) + { + Settings.RawAccelSettings.GUISettings = guiSettings; + Settings.RawAccelSettings.Save(); + } + } + public void UpdateActiveSettingsFromFields() { var driverSettings = Settings.RawAccelSettings.AccelerationSettings; @@ -92,7 +126,8 @@ public void UpdateActiveSettingsFromFields() SettingsErrors errors = Settings.TryUpdateActiveSettings(settings); if (errors.Empty()) { - RefreshOnRead(); + RefreshToggleStateFromNewSettings(); + RefreshOnRead(Settings.RawAccelSettings.AccelerationSettings); } else { @@ -100,26 +135,24 @@ public void UpdateActiveSettingsFromFields() } } - public void RefreshOnRead() + public void RefreshOnRead(DriverSettings args) { - UpdateShownActiveValues(); - UpdateGraph(); + UpdateShownActiveValues(args); + UpdateGraph(args); } - public void UpdateGraph() + public void UpdateGraph(DriverSettings args) { AccelCharts.Calculate( - Settings.ActiveAccel, - Settings.RawAccelSettings.AccelerationSettings); + Settings.ActiveAccel, + args); AccelCharts.Bind(); } - public void UpdateShownActiveValues() + public void UpdateShownActiveValues(DriverSettings args) { - var settings = Settings.RawAccelSettings.AccelerationSettings; - - AccelCharts.ShowActive(settings); - ApplyOptions.SetActiveValues(settings); + AccelCharts.ShowActive(args); + ApplyOptions.SetActiveValues(args); } private Timer SetupChartTimer() @@ -131,38 +164,47 @@ private Timer SetupChartTimer() return chartTimer; } - private Timer SetupButtonTimer() + private void SetupButtons() { - Timer buttonTimer = new Timer(); - buttonTimer.Enabled = true; - buttonTimer.Interval = Convert.ToInt32(DriverInterop.WriteDelayMs); - buttonTimer.Tick += new System.EventHandler(OnButtonTimerTick); - return buttonTimer; + WriteButton.Top = AccelCharts.Top + AccelCharts.TopChartHeight - Constants.ButtonVerticalOffset; + SetWriteButtonDefault(); + + ToggleButton.Appearance = Appearance.Button; + ToggleButton.FlatStyle = FlatStyle.System; + ToggleButton.TextAlign = ContentAlignment.MiddleCenter; + ToggleButton.Size = WriteButton.Size; + ToggleButton.Top = WriteButton.Top; + + RefreshToggleStateFromNewSettings(); + SetToggleButtonDefault(); } - private void SetupWriteButton() + private void RefreshToggleStateFromNewSettings() { - WriteButton.Top = AccelCharts.Top + AccelCharts.TopChartHeight - Constants.WriteButtonVerticalOffset; - SetWriteButtonDefault(); + SettingsNotDefault = !Settings.RawAccelSettings.IsDefaultEquivalent(); + LastToggleChecked = SettingsNotDefault; } private void SetWriteButtonDefault() { + WriteButton.Font = DefaultButtonFont; WriteButton.Text = Constants.WriteButtonDefaultText; WriteButton.Enabled = true; WriteButton.Update(); } - private void SetWriteButtonDelay() + private void SetToggleButtonDefault() { - WriteButton.Enabled = false; - WriteButton.Text = $"{Constants.WriteButtonDelayText} : {ButtonTimer.Interval} ms"; - WriteButton.Update(); + ToggleButton.Checked = LastToggleChecked; + ToggleButton.Enabled = SettingsNotDefault; + ToggleButton.Font = DefaultButtonFont; + ToggleButton.Text = ToggleButton.Checked ? "Enabled" : "Disabled"; + ToggleButton.Update(); } private void OnScaleMenuItemClick(object sender, EventArgs e) { - UpdateGraph(); + UpdateGraph(Settings.RawAccelSettings.AccelerationSettings); } private void OnWriteButtonClick(object sender, EventArgs e) @@ -170,18 +212,64 @@ private void OnWriteButtonClick(object sender, EventArgs e) UpdateActiveSettingsFromFields(); } + private void OnToggleButtonClick(object sender, EventArgs e) + { + var settings = ToggleButton.Checked ? + Settings.RawAccelSettings.AccelerationSettings : + DriverInterop.DefaultSettings; + + ToggleButtonDelay(); + + SettingsManager.SendToDriver(settings); + Settings.ActiveAccel.UpdateFromSettings(settings); + RefreshOnRead(settings); + } + private void OnButtonTimerTick(object sender, EventArgs e) { ButtonTimer.Stop(); SetWriteButtonDefault(); + SetToggleButtonDefault(); } - private void WriteButtonDelay() + private void StartButtonTimer() { - SetWriteButtonDelay(); + ButtonTimer.Interval = ButtonTimerInterval; ButtonTimer.Start(); } + private void WriteButtonDelay() + { + WriteButton.Font = SmallButtonFont; + WriteButton.Text = $"{Constants.ButtonDelayText} : {ButtonTimerInterval} ms"; + WriteButton.Enabled = false; + WriteButton.Update(); + + if (ToggleButton.Enabled) + { + LastToggleChecked = ToggleButton.Checked; + ToggleButton.Checked = false; + ToggleButton.Enabled = false; + ToggleButton.Update(); + } + StartButtonTimer(); + } + + private void ToggleButtonDelay() + { + LastToggleChecked = ToggleButton.Checked; + ToggleButton.Checked = false; + ToggleButton.Enabled = false; + ToggleButton.Font = SmallButtonFont; + ToggleButton.Text = $"{Constants.ButtonDelayText} : {ButtonTimerInterval} ms"; + ToggleButton.Update(); + + WriteButton.Enabled = false; + WriteButton.Update(); + + StartButtonTimer(); + } + private void OnChartTimerTick(object sender, EventArgs e) { AccelCharts.DrawLastMovement(); diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index 9f557f3c..579e664c 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -23,6 +23,7 @@ public static AccelGUI Construct( ComboBox accelTypeDropX, ComboBox accelTypeDropY, Button writeButton, + ButtonBase toggleButton, ToolStripMenuItem showVelocityGainToolStripMenuItem, ToolStripMenuItem showLastMouseMoveMenuItem, ToolStripMenuItem wholeVectorToolStripMenuItem, @@ -31,7 +32,6 @@ public static AccelGUI Construct( ToolStripMenuItem legacyCapToolStripMenuItem, ToolStripMenuItem gainOffsetToolStripMenuItem, ToolStripMenuItem legacyOffsetToolStripMenuItem, - ToolStripMenuItem autoWriteMenuItem, ToolStripMenuItem scaleMenuItem, ToolStripTextBox dpiTextBox, ToolStripTextBox pollRateTextBox, @@ -326,7 +326,6 @@ public static AccelGUI Construct( activeAccel, accelCalculator.DPI, accelCalculator.PollRate, - autoWriteMenuItem, showLastMouseMoveMenuItem, showVelocityGainToolStripMenuItem); @@ -339,6 +338,7 @@ public static AccelGUI Construct( settings, applyOptions, writeButton, + toggleButton, mouseWatcher, scaleMenuItem); } diff --git a/grapher/Models/Charts/AccelCharts.cs b/grapher/Models/Charts/AccelCharts.cs index 7484a3ac..9087b308 100644 --- a/grapher/Models/Charts/AccelCharts.cs +++ b/grapher/Models/Charts/AccelCharts.cs @@ -133,14 +133,14 @@ public void SetWidened() { ChartState.SetWidened(); UpdateFormWidth(); - AlignWriteButton(); + //AlignWriteButton(); } public void SetNarrowed() { ChartState.SetNarrowed(); UpdateFormWidth(); - AlignWriteButton(); + //AlignWriteButton(); } public void Redraw() diff --git a/grapher/Models/Serialized/GUISettings.cs b/grapher/Models/Serialized/GUISettings.cs index 84e681b8..f9e57551 100644 --- a/grapher/Models/Serialized/GUISettings.cs +++ b/grapher/Models/Serialized/GUISettings.cs @@ -10,32 +10,35 @@ public class GUISettings public GUISettings() {} - public GUISettings(bool autoWrite, int dpi, int pollRate) - { - AutoWriteToDriverOnStartup = autoWrite; - DPI = dpi; - PollRate = pollRate; - } - #endregion Constructors #region Properties - [JsonProperty(Order = 1)] - public bool AutoWriteToDriverOnStartup { get; set; } - [JsonProperty(Order = 2)] + [JsonProperty(Order = 1)] public int DPI { get; set; } - [JsonProperty(Order = 3)] + [JsonProperty(Order = 2)] public int PollRate { get; set; } - [JsonProperty(Order = 4)] + [JsonProperty(Order = 3)] public bool ShowLastMouseMove { get; set; } [JsonProperty(Order = 4)] public bool ShowVelocityAndGain { get; set; } #endregion Properties + + #region Methods + + public bool ValueEquals(GUISettings other) + { + return DPI == other.DPI && + PollRate == other.PollRate && + ShowLastMouseMove == other.ShowLastMouseMove && + ShowVelocityAndGain == other.ShowVelocityAndGain; + } + + #endregion Methods } } diff --git a/grapher/Models/Serialized/RawAccelSettings.cs b/grapher/Models/Serialized/RawAccelSettings.cs index 6f48d443..e0362ff7 100644 --- a/grapher/Models/Serialized/RawAccelSettings.cs +++ b/grapher/Models/Serialized/RawAccelSettings.cs @@ -115,6 +115,18 @@ private void AddComments(JObject thisJO) .AddFirst(new JProperty("### Mode Types ###", modes)); } + public bool IsDefaultEquivalent() + { + bool wholeOrNoY = AccelerationSettings.combineMagnitudes || + AccelerationSettings.modes.y == AccelMode.noaccel; + + return AccelerationSettings.sensitivity.x == 1 && + AccelerationSettings.sensitivity.y == 1 && + AccelerationSettings.rotation == 0 && + AccelerationSettings.modes.x == AccelMode.noaccel && + wholeOrNoY; + } + #endregion Methods } } diff --git a/grapher/Models/Serialized/SettingsManager.cs b/grapher/Models/Serialized/SettingsManager.cs index f53c9c95..8712c87a 100644 --- a/grapher/Models/Serialized/SettingsManager.cs +++ b/grapher/Models/Serialized/SettingsManager.cs @@ -14,14 +14,12 @@ public SettingsManager( ManagedAccel activeAccel, Field dpiField, Field pollRateField, - ToolStripMenuItem autoWrite, ToolStripMenuItem showLastMouseMove, ToolStripMenuItem showVelocityAndGain) { ActiveAccel = activeAccel; DpiField = dpiField; PollRateField = pollRateField; - AutoWriteMenuItem = autoWrite; ShowLastMouseMoveMenuItem = showLastMouseMove; ShowVelocityAndGainMoveMenuItem = showVelocityAndGain; } @@ -38,8 +36,6 @@ public SettingsManager( private Field PollRateField { get; set; } - private ToolStripMenuItem AutoWriteMenuItem { get; set; } - private ToolStripMenuItem ShowLastMouseMoveMenuItem { get; set; } private ToolStripMenuItem ShowVelocityAndGainMoveMenuItem { get; set; } @@ -90,17 +86,20 @@ public SettingsErrors TryUpdateActiveSettings(DriverSettings settings) return errors; } - public void UpdateActiveAccelFromFileSettings(DriverSettings settings) + public void UpdateFieldsFromGUISettings() { - TryUpdateAccel(settings); - DpiField.SetToEntered(RawAccelSettings.GUISettings.DPI); PollRateField.SetToEntered(RawAccelSettings.GUISettings.PollRate); - AutoWriteMenuItem.Checked = RawAccelSettings.GUISettings.AutoWriteToDriverOnStartup; ShowLastMouseMoveMenuItem.Checked = RawAccelSettings.GUISettings.ShowLastMouseMove; ShowVelocityAndGainMoveMenuItem.Checked = RawAccelSettings.GUISettings.ShowVelocityAndGain; } + public void UpdateActiveAccelFromFileSettings(DriverSettings settings) + { + TryUpdateAccel(settings); + UpdateFieldsFromGUISettings(); + } + public SettingsErrors TryUpdateAccel(DriverSettings settings) { var errors = SendToDriverSafe(settings); @@ -124,7 +123,6 @@ public GUISettings MakeGUISettingsFromFields() { return new GUISettings { - AutoWriteToDriverOnStartup = AutoWriteMenuItem.Checked, DPI = (int)DpiField.Data, PollRate = (int)PollRateField.Data, ShowLastMouseMove = ShowLastMouseMoveMenuItem.Checked, @@ -139,10 +137,8 @@ public void Startup() try { RawAccelSettings = RawAccelSettings.Load(() => MakeGUISettingsFromFields()); - if (RawAccelSettings.GUISettings.AutoWriteToDriverOnStartup) - { - UpdateActiveAccelFromFileSettings(RawAccelSettings.AccelerationSettings); - } + UpdateFieldsFromGUISettings(); + UpdateActiveAccelFromFileSettings(RawAccelSettings.AccelerationSettings); return; } catch (JsonException e) From 37d2cb7d3ed25862683ef807712c7d50f71e8493 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 8 Oct 2020 02:08:27 -0400 Subject: [PATCH 05/10] add scroll to charts --- grapher/Constants/Constants.cs | 3 + grapher/Form1.Designer.cs | 2166 +++++++++-------- grapher/Form1.cs | 24 + grapher/Models/AccelGUI.cs | 2 + grapher/Models/Charts/AccelCharts.cs | 34 +- .../Models/Charts/ChartState/ChartState.cs | 25 +- grapher/Models/Charts/ChartXY.cs | 38 +- grapher/Models/Options/ApplyOptions.cs | 7 +- 8 files changed, 1140 insertions(+), 1159 deletions(-) diff --git a/grapher/Constants/Constants.cs b/grapher/Constants/Constants.cs index 639bd9b9..5a05863a 100644 --- a/grapher/Constants/Constants.cs +++ b/grapher/Constants/Constants.cs @@ -115,6 +115,9 @@ public static class Constants /// Color of font in active value labels. public static readonly Color ActiveValueFontColor = Color.FromArgb(255, 65, 65, 65); + public static readonly Point Origin = new Point(0); + public static readonly Size MaxSize = new Size(9999, 9999); + #endregion ReadOnly } } diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index c2d77c9d..8c3af0b6 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -35,67 +35,112 @@ private void InitializeComponent() System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series5 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Title title2 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series10 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series11 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series12 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Title title3 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea4 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.Legend legend4 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series10 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series11 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series12 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series13 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series14 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series15 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Title title4 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea5 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.Legend legend5 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series14 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series15 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series16 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series17 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series18 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Title title5 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea6 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.Legend legend6 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series18 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series19 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series20 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series21 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Title title6 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RawAcceleration)); - this.AccelerationChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.accelTypeDropX = new System.Windows.Forms.ComboBox(); - this.sensitivityBoxX = new System.Windows.Forms.TextBox(); - this.sensitivityLabel = new System.Windows.Forms.Label(); - this.rotationBox = new System.Windows.Forms.TextBox(); - this.rotationLabel = new System.Windows.Forms.Label(); - this.accelerationBoxX = new System.Windows.Forms.TextBox(); - this.constantOneLabelX = new System.Windows.Forms.Label(); - this.capBoxX = new System.Windows.Forms.TextBox(); - this.capLabelX = new System.Windows.Forms.Label(); - this.weightBoxX = new System.Windows.Forms.TextBox(); - this.weightLabelX = new System.Windows.Forms.Label(); - this.weightBoxY = new System.Windows.Forms.TextBox(); - this.limitBoxX = new System.Windows.Forms.TextBox(); - this.limitLabelX = new System.Windows.Forms.Label(); - this.midpointBoxX = new System.Windows.Forms.TextBox(); - this.constantThreeLabelX = new System.Windows.Forms.Label(); - this.offsetBoxX = new System.Windows.Forms.TextBox(); - this.offsetLabelX = new System.Windows.Forms.Label(); - this.writeButton = new System.Windows.Forms.Button(); - this.sensitivityBoxY = new System.Windows.Forms.TextBox(); - this.capBoxY = new System.Windows.Forms.TextBox(); - this.sensXYLock = new System.Windows.Forms.CheckBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.toggleButton = new System.Windows.Forms.CheckBox(); + this.scaleLabelY = new System.Windows.Forms.Label(); + this.ScaleActiveYLabel = new System.Windows.Forms.Label(); + this.scaleBoxY = new System.Windows.Forms.TextBox(); + this.ScaleActiveXLabel = new System.Windows.Forms.Label(); + this.scaleLabelX = new System.Windows.Forms.Label(); + this.scaleBoxX = new System.Windows.Forms.TextBox(); + this.expLabelY = new System.Windows.Forms.Label(); + this.ExpActiveYLabel = new System.Windows.Forms.Label(); + this.expBoxY = new System.Windows.Forms.TextBox(); + this.ExpActiveXLabel = new System.Windows.Forms.Label(); + this.expLabelX = new System.Windows.Forms.Label(); + this.expBoxX = new System.Windows.Forms.TextBox(); + this.ActiveValueTitleY = new System.Windows.Forms.Label(); + this.AccelTypeActiveLabelY = new System.Windows.Forms.Label(); + this.OptionSetYTitle = new System.Windows.Forms.Label(); + this.OptionSetXTitle = new System.Windows.Forms.Label(); + this.constantThreeLabelY = new System.Windows.Forms.Label(); + this.limitLabelY = new System.Windows.Forms.Label(); + this.offsetLabelY = new System.Windows.Forms.Label(); + this.weightLabelY = new System.Windows.Forms.Label(); + this.capLabelY = new System.Windows.Forms.Label(); + this.constantOneLabelY = new System.Windows.Forms.Label(); + this.ByComponentXYLock = new System.Windows.Forms.CheckBox(); + this.MidpointActiveYLabel = new System.Windows.Forms.Label(); + this.LimitActiveYLabel = new System.Windows.Forms.Label(); + this.OffsetActiveYLabel = new System.Windows.Forms.Label(); + this.AccelerationActiveLabelY = new System.Windows.Forms.Label(); + this.accelTypeDropY = new System.Windows.Forms.ComboBox(); + this.midpointBoxY = new System.Windows.Forms.TextBox(); + this.limitBoxY = new System.Windows.Forms.TextBox(); + this.offsetBoxY = new System.Windows.Forms.TextBox(); + this.accelerationBoxY = new System.Windows.Forms.TextBox(); + this.MidpointActiveXLabel = new System.Windows.Forms.Label(); + this.LimitActiveXLabel = new System.Windows.Forms.Label(); + this.OffsetActiveXLabel = new System.Windows.Forms.Label(); + this.CapActiveYLabel = new System.Windows.Forms.Label(); + this.WeightActiveYLabel = new System.Windows.Forms.Label(); + this.WeightActiveXLabel = new System.Windows.Forms.Label(); + this.CapActiveXLabel = new System.Windows.Forms.Label(); + this.AccelerationActiveLabelX = new System.Windows.Forms.Label(); + this.AccelTypeActiveLabelX = new System.Windows.Forms.Label(); + this.RotationActiveLabel = new System.Windows.Forms.Label(); + this.SensitivityActiveYLabel = new System.Windows.Forms.Label(); + this.SensitivityActiveXLabel = new System.Windows.Forms.Label(); + this.ActiveValueTitle = new System.Windows.Forms.Label(); + this.MouseLabel = new System.Windows.Forms.Label(); this.LockXYLabel = new System.Windows.Forms.Label(); - this.VelocityChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.GainChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.sensXYLock = new System.Windows.Forms.CheckBox(); + this.capBoxY = new System.Windows.Forms.TextBox(); + this.sensitivityBoxY = new System.Windows.Forms.TextBox(); + this.writeButton = new System.Windows.Forms.Button(); + this.offsetLabelX = new System.Windows.Forms.Label(); + this.offsetBoxX = new System.Windows.Forms.TextBox(); + this.constantThreeLabelX = new System.Windows.Forms.Label(); + this.midpointBoxX = new System.Windows.Forms.TextBox(); + this.limitLabelX = new System.Windows.Forms.Label(); + this.limitBoxX = new System.Windows.Forms.TextBox(); + this.weightBoxY = new System.Windows.Forms.TextBox(); + this.weightLabelX = new System.Windows.Forms.Label(); + this.weightBoxX = new System.Windows.Forms.TextBox(); + this.capLabelX = new System.Windows.Forms.Label(); + this.capBoxX = new System.Windows.Forms.TextBox(); + this.constantOneLabelX = new System.Windows.Forms.Label(); + this.accelerationBoxX = new System.Windows.Forms.TextBox(); + this.rotationLabel = new System.Windows.Forms.Label(); + this.rotationBox = new System.Windows.Forms.TextBox(); + this.sensitivityLabel = new System.Windows.Forms.Label(); + this.sensitivityBoxX = new System.Windows.Forms.TextBox(); + this.accelTypeDropX = new System.Windows.Forms.ComboBox(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.graphsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.scaleByDPIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -116,1266 +161,1251 @@ private void InitializeComponent() this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.wholeVectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.byVectorComponentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.AccelerationChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.VelocityChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.panel2 = new System.Windows.Forms.Panel(); this.GainChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.MouseLabel = new System.Windows.Forms.Label(); - this.ActiveValueTitle = new System.Windows.Forms.Label(); - this.SensitivityActiveXLabel = new System.Windows.Forms.Label(); - this.SensitivityActiveYLabel = new System.Windows.Forms.Label(); - this.RotationActiveLabel = new System.Windows.Forms.Label(); - this.AccelTypeActiveLabelX = new System.Windows.Forms.Label(); - this.AccelerationActiveLabelX = new System.Windows.Forms.Label(); - this.CapActiveXLabel = new System.Windows.Forms.Label(); - this.WeightActiveXLabel = new System.Windows.Forms.Label(); - this.WeightActiveYLabel = new System.Windows.Forms.Label(); - this.CapActiveYLabel = new System.Windows.Forms.Label(); - this.OffsetActiveXLabel = new System.Windows.Forms.Label(); - this.LimitActiveXLabel = new System.Windows.Forms.Label(); - this.MidpointActiveXLabel = new System.Windows.Forms.Label(); - this.accelerationBoxY = new System.Windows.Forms.TextBox(); - this.offsetBoxY = new System.Windows.Forms.TextBox(); - this.limitBoxY = new System.Windows.Forms.TextBox(); - this.midpointBoxY = new System.Windows.Forms.TextBox(); - this.accelTypeDropY = new System.Windows.Forms.ComboBox(); - this.AccelerationActiveLabelY = new System.Windows.Forms.Label(); - this.OffsetActiveYLabel = new System.Windows.Forms.Label(); - this.LimitActiveYLabel = new System.Windows.Forms.Label(); - this.MidpointActiveYLabel = new System.Windows.Forms.Label(); - this.ByComponentXYLock = new System.Windows.Forms.CheckBox(); - this.constantOneLabelY = new System.Windows.Forms.Label(); - this.capLabelY = new System.Windows.Forms.Label(); - this.weightLabelY = new System.Windows.Forms.Label(); - this.offsetLabelY = new System.Windows.Forms.Label(); - this.limitLabelY = new System.Windows.Forms.Label(); - this.constantThreeLabelY = new System.Windows.Forms.Label(); - this.OptionSetXTitle = new System.Windows.Forms.Label(); - this.OptionSetYTitle = new System.Windows.Forms.Label(); - this.AccelTypeActiveLabelY = new System.Windows.Forms.Label(); - this.ActiveValueTitleY = new System.Windows.Forms.Label(); - this.expLabelY = new System.Windows.Forms.Label(); - this.ExpActiveYLabel = new System.Windows.Forms.Label(); - this.expBoxY = new System.Windows.Forms.TextBox(); - this.ExpActiveXLabel = new System.Windows.Forms.Label(); - this.expLabelX = new System.Windows.Forms.Label(); - this.expBoxX = new System.Windows.Forms.TextBox(); - this.scaleLabelY = new System.Windows.Forms.Label(); - this.ScaleActiveYLabel = new System.Windows.Forms.Label(); - this.scaleBoxY = new System.Windows.Forms.TextBox(); - this.ScaleActiveXLabel = new System.Windows.Forms.Label(); - this.scaleLabelX = new System.Windows.Forms.Label(); - this.scaleBoxX = new System.Windows.Forms.TextBox(); - this.toggleButton = new System.Windows.Forms.CheckBox(); - ((System.ComponentModel.ISupportInitialize)(this.AccelerationChart)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.VelocityChart)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.GainChart)).BeginInit(); + this.VelocityChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.AccelerationChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.GainChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.VelocityChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.AccelerationChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.panel1.SuspendLayout(); this.menuStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.AccelerationChartY)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.VelocityChartY)).BeginInit(); + this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.GainChartY)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.VelocityChartY)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.AccelerationChartY)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.GainChart)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.VelocityChart)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.AccelerationChart)).BeginInit(); this.SuspendLayout(); // - // AccelerationChart - // - chartArea1.AxisX.Title = "Input Speed (counts/ms)"; - chartArea1.AxisY.Title = "Ratio of Output to Input"; - chartArea1.Name = "ChartArea1"; - this.AccelerationChart.ChartAreas.Add(chartArea1); - legend1.Name = "Legend1"; - this.AccelerationChart.Legends.Add(legend1); - this.AccelerationChart.Location = new System.Drawing.Point(482, 0); - this.AccelerationChart.Name = "AccelerationChart"; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series1.Legend = "Legend1"; - series1.Name = "Accelerated Sensitivity"; - series2.ChartArea = "ChartArea1"; - series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - series2.Legend = "Legend1"; - series2.Name = "Last Mouse Move"; - series3.ChartArea = "ChartArea1"; - series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series3.Legend = "Legend1"; - series3.Name = "Y: Accelerated Sensitivity"; - series4.ChartArea = "ChartArea1"; - series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series4.IsVisibleInLegend = false; - series4.Legend = "Legend1"; - series4.Name = "Y - Last Mouse Move"; - this.AccelerationChart.Series.Add(series1); - this.AccelerationChart.Series.Add(series2); - this.AccelerationChart.Series.Add(series3); - 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; - title1.Name = "Title"; - title1.Text = "Sensitivity"; - this.AccelerationChart.Titles.Add(title1); + // panel1 + // + this.panel1.AutoSize = true; + this.panel1.Controls.Add(this.toggleButton); + this.panel1.Controls.Add(this.scaleLabelY); + this.panel1.Controls.Add(this.ScaleActiveYLabel); + this.panel1.Controls.Add(this.scaleBoxY); + this.panel1.Controls.Add(this.ScaleActiveXLabel); + this.panel1.Controls.Add(this.scaleLabelX); + this.panel1.Controls.Add(this.scaleBoxX); + this.panel1.Controls.Add(this.expLabelY); + this.panel1.Controls.Add(this.ExpActiveYLabel); + this.panel1.Controls.Add(this.expBoxY); + this.panel1.Controls.Add(this.ExpActiveXLabel); + this.panel1.Controls.Add(this.expLabelX); + this.panel1.Controls.Add(this.expBoxX); + this.panel1.Controls.Add(this.ActiveValueTitleY); + this.panel1.Controls.Add(this.AccelTypeActiveLabelY); + this.panel1.Controls.Add(this.OptionSetYTitle); + this.panel1.Controls.Add(this.OptionSetXTitle); + this.panel1.Controls.Add(this.constantThreeLabelY); + this.panel1.Controls.Add(this.limitLabelY); + this.panel1.Controls.Add(this.offsetLabelY); + this.panel1.Controls.Add(this.weightLabelY); + this.panel1.Controls.Add(this.capLabelY); + this.panel1.Controls.Add(this.constantOneLabelY); + this.panel1.Controls.Add(this.ByComponentXYLock); + this.panel1.Controls.Add(this.MidpointActiveYLabel); + this.panel1.Controls.Add(this.LimitActiveYLabel); + this.panel1.Controls.Add(this.OffsetActiveYLabel); + this.panel1.Controls.Add(this.AccelerationActiveLabelY); + this.panel1.Controls.Add(this.accelTypeDropY); + this.panel1.Controls.Add(this.midpointBoxY); + this.panel1.Controls.Add(this.limitBoxY); + this.panel1.Controls.Add(this.offsetBoxY); + this.panel1.Controls.Add(this.accelerationBoxY); + this.panel1.Controls.Add(this.MidpointActiveXLabel); + this.panel1.Controls.Add(this.LimitActiveXLabel); + this.panel1.Controls.Add(this.OffsetActiveXLabel); + this.panel1.Controls.Add(this.CapActiveYLabel); + this.panel1.Controls.Add(this.WeightActiveYLabel); + this.panel1.Controls.Add(this.WeightActiveXLabel); + this.panel1.Controls.Add(this.CapActiveXLabel); + this.panel1.Controls.Add(this.AccelerationActiveLabelX); + this.panel1.Controls.Add(this.AccelTypeActiveLabelX); + this.panel1.Controls.Add(this.RotationActiveLabel); + this.panel1.Controls.Add(this.SensitivityActiveYLabel); + this.panel1.Controls.Add(this.SensitivityActiveXLabel); + this.panel1.Controls.Add(this.ActiveValueTitle); + this.panel1.Controls.Add(this.MouseLabel); + this.panel1.Controls.Add(this.LockXYLabel); + this.panel1.Controls.Add(this.sensXYLock); + this.panel1.Controls.Add(this.capBoxY); + this.panel1.Controls.Add(this.sensitivityBoxY); + this.panel1.Controls.Add(this.writeButton); + this.panel1.Controls.Add(this.offsetLabelX); + this.panel1.Controls.Add(this.offsetBoxX); + this.panel1.Controls.Add(this.constantThreeLabelX); + this.panel1.Controls.Add(this.midpointBoxX); + this.panel1.Controls.Add(this.limitLabelX); + this.panel1.Controls.Add(this.limitBoxX); + this.panel1.Controls.Add(this.weightBoxY); + this.panel1.Controls.Add(this.weightLabelX); + this.panel1.Controls.Add(this.weightBoxX); + this.panel1.Controls.Add(this.capLabelX); + this.panel1.Controls.Add(this.capBoxX); + this.panel1.Controls.Add(this.constantOneLabelX); + this.panel1.Controls.Add(this.accelerationBoxX); + this.panel1.Controls.Add(this.rotationLabel); + this.panel1.Controls.Add(this.rotationBox); + this.panel1.Controls.Add(this.sensitivityLabel); + this.panel1.Controls.Add(this.sensitivityBoxX); + this.panel1.Controls.Add(this.accelTypeDropX); + this.panel1.Controls.Add(this.menuStrip1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Left; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.MinimumSize = new System.Drawing.Size(2, 333); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(483, 956); + this.panel1.TabIndex = 34; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // - // accelTypeDropX + // toggleButton // - this.accelTypeDropX.FormattingEnabled = true; - 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 = 4; - this.accelTypeDropX.Text = "Accel Type"; + this.toggleButton.Location = new System.Drawing.Point(214, 387); + this.toggleButton.Name = "toggleButton"; + this.toggleButton.Size = new System.Drawing.Size(104, 24); + this.toggleButton.TabIndex = 112; + this.toggleButton.Text = "toggle"; + this.toggleButton.UseVisualStyleBackColor = true; // - // sensitivityBoxX + // scaleLabelY // - 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 = 0; + this.scaleLabelY.AutoSize = true; + this.scaleLabelY.Location = new System.Drawing.Point(263, 333); + this.scaleLabelY.Name = "scaleLabelY"; + this.scaleLabelY.Size = new System.Drawing.Size(34, 13); + this.scaleLabelY.TabIndex = 149; + this.scaleLabelY.Text = "Scale"; // - // sensitivityLabel + // ScaleActiveYLabel // - this.sensitivityLabel.AutoSize = true; - this.sensitivityLabel.Location = new System.Drawing.Point(24, 49); - this.sensitivityLabel.Name = "sensitivityLabel"; - this.sensitivityLabel.Size = new System.Drawing.Size(54, 13); - this.sensitivityLabel.TabIndex = 4; - this.sensitivityLabel.Text = "Sensitivity"; + this.ScaleActiveYLabel.AutoSize = true; + this.ScaleActiveYLabel.Location = new System.Drawing.Point(414, 333); + this.ScaleActiveYLabel.Name = "ScaleActiveYLabel"; + this.ScaleActiveYLabel.Size = new System.Drawing.Size(13, 13); + this.ScaleActiveYLabel.TabIndex = 148; + this.ScaleActiveYLabel.Text = "0"; // - // rotationBox + // scaleBoxY // - 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 = 3; + this.scaleBoxY.Location = new System.Drawing.Point(332, 330); + this.scaleBoxY.Name = "scaleBoxY"; + this.scaleBoxY.Size = new System.Drawing.Size(76, 20); + this.scaleBoxY.TabIndex = 102; // - // rotationLabel + // ScaleActiveXLabel // - this.rotationLabel.AutoSize = true; - this.rotationLabel.Location = new System.Drawing.Point(34, 75); - this.rotationLabel.Name = "rotationLabel"; - this.rotationLabel.Size = new System.Drawing.Size(47, 13); - this.rotationLabel.TabIndex = 6; - this.rotationLabel.Text = "Rotation"; + this.ScaleActiveXLabel.AutoSize = true; + this.ScaleActiveXLabel.Location = new System.Drawing.Point(197, 333); + this.ScaleActiveXLabel.Name = "ScaleActiveXLabel"; + this.ScaleActiveXLabel.Size = new System.Drawing.Size(13, 13); + this.ScaleActiveXLabel.TabIndex = 147; + this.ScaleActiveXLabel.Text = "0"; // - // accelerationBoxX + // scaleLabelX // - 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 = 5; + this.scaleLabelX.AutoSize = true; + this.scaleLabelX.Location = new System.Drawing.Point(37, 333); + this.scaleLabelX.Name = "scaleLabelX"; + this.scaleLabelX.Size = new System.Drawing.Size(34, 13); + this.scaleLabelX.TabIndex = 146; + this.scaleLabelX.Text = "Scale"; + this.scaleLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // constantOneLabelX + // scaleBoxX // - this.constantOneLabelX.AutoSize = true; - this.constantOneLabelX.Location = new System.Drawing.Point(24, 140); - this.constantOneLabelX.Name = "constantOneLabelX"; - this.constantOneLabelX.Size = new System.Drawing.Size(66, 13); - this.constantOneLabelX.TabIndex = 9; - this.constantOneLabelX.Text = "Acceleration"; - this.constantOneLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.scaleBoxX.Location = new System.Drawing.Point(106, 330); + this.scaleBoxX.Name = "scaleBoxX"; + this.scaleBoxX.Size = new System.Drawing.Size(76, 20); + this.scaleBoxX.TabIndex = 88; // - // capBoxX + // expLabelY // - 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 = 7; + this.expLabelY.AutoSize = true; + this.expLabelY.Location = new System.Drawing.Point(263, 276); + this.expLabelY.Name = "expLabelY"; + this.expLabelY.Size = new System.Drawing.Size(52, 13); + this.expLabelY.TabIndex = 145; + this.expLabelY.Text = "Exponent"; // - // capLabelX + // ExpActiveYLabel // - this.capLabelX.AutoSize = true; - this.capLabelX.Location = new System.Drawing.Point(43, 166); - this.capLabelX.Name = "capLabelX"; - this.capLabelX.Size = new System.Drawing.Size(26, 13); - this.capLabelX.TabIndex = 11; - this.capLabelX.Text = "Cap"; - this.capLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.ExpActiveYLabel.AutoSize = true; + this.ExpActiveYLabel.Location = new System.Drawing.Point(414, 276); + this.ExpActiveYLabel.Name = "ExpActiveYLabel"; + this.ExpActiveYLabel.Size = new System.Drawing.Size(13, 13); + this.ExpActiveYLabel.TabIndex = 144; + this.ExpActiveYLabel.Text = "0"; // - // weightBoxX + // expBoxY // - 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 = 8; + this.expBoxY.Location = new System.Drawing.Point(332, 273); + this.expBoxY.Name = "expBoxY"; + this.expBoxY.Size = new System.Drawing.Size(76, 20); + this.expBoxY.TabIndex = 109; // - // weightLabelX + // ExpActiveXLabel // - this.weightLabelX.AutoSize = true; - this.weightLabelX.Location = new System.Drawing.Point(40, 192); - this.weightLabelX.Name = "weightLabelX"; - this.weightLabelX.Size = new System.Drawing.Size(41, 13); - this.weightLabelX.TabIndex = 13; - this.weightLabelX.Text = "Weight"; - this.weightLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.ExpActiveXLabel.AutoSize = true; + this.ExpActiveXLabel.Location = new System.Drawing.Point(197, 276); + this.ExpActiveXLabel.Name = "ExpActiveXLabel"; + this.ExpActiveXLabel.Size = new System.Drawing.Size(13, 13); + this.ExpActiveXLabel.TabIndex = 143; + this.ExpActiveXLabel.Text = "0"; // - // weightBoxY + // expLabelX // - 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 = 18; + this.expLabelX.AutoSize = true; + this.expLabelX.Location = new System.Drawing.Point(37, 276); + this.expLabelX.Name = "expLabelX"; + this.expLabelX.Size = new System.Drawing.Size(52, 13); + this.expLabelX.TabIndex = 142; + this.expLabelX.Text = "Exponent"; + this.expLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // limitBoxX + // expBoxX // - 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 = 10; + this.expBoxX.Location = new System.Drawing.Point(106, 273); + this.expBoxX.Name = "expBoxX"; + this.expBoxX.Size = new System.Drawing.Size(76, 20); + this.expBoxX.TabIndex = 95; // - // limitLabelX + // ActiveValueTitleY // - this.limitLabelX.AutoSize = true; - this.limitLabelX.Location = new System.Drawing.Point(24, 244); - this.limitLabelX.Name = "limitLabelX"; - this.limitLabelX.Size = new System.Drawing.Size(28, 13); - this.limitLabelX.TabIndex = 16; - this.limitLabelX.Text = "Limit"; - this.limitLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.ActiveValueTitleY.AutoSize = true; + this.ActiveValueTitleY.Location = new System.Drawing.Point(429, 29); + this.ActiveValueTitleY.Name = "ActiveValueTitleY"; + this.ActiveValueTitleY.Size = new System.Drawing.Size(41, 13); + this.ActiveValueTitleY.TabIndex = 141; + this.ActiveValueTitleY.Text = "Current"; // - // midpointBoxX + // AccelTypeActiveLabelY // - 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 = 12; + this.AccelTypeActiveLabelY.AutoSize = true; + this.AccelTypeActiveLabelY.Location = new System.Drawing.Point(414, 116); + this.AccelTypeActiveLabelY.Name = "AccelTypeActiveLabelY"; + this.AccelTypeActiveLabelY.Size = new System.Drawing.Size(66, 13); + this.AccelTypeActiveLabelY.TabIndex = 140; + this.AccelTypeActiveLabelY.Text = "SigmoidGain"; // - // constantThreeLabelX + // OptionSetYTitle // - this.constantThreeLabelX.AutoSize = true; - this.constantThreeLabelX.Location = new System.Drawing.Point(34, 300); - this.constantThreeLabelX.Name = "constantThreeLabelX"; - this.constantThreeLabelX.Size = new System.Drawing.Size(47, 13); - this.constantThreeLabelX.TabIndex = 18; - this.constantThreeLabelX.Text = "Midpoint"; - this.constantThreeLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.OptionSetYTitle.AutoSize = true; + this.OptionSetYTitle.Location = new System.Drawing.Point(360, 97); + this.OptionSetYTitle.Name = "OptionSetYTitle"; + this.OptionSetYTitle.Size = new System.Drawing.Size(14, 13); + this.OptionSetYTitle.TabIndex = 139; + this.OptionSetYTitle.Text = "Y"; // - // offsetBoxX + // OptionSetXTitle // - 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 = 9; + this.OptionSetXTitle.AutoSize = true; + this.OptionSetXTitle.Location = new System.Drawing.Point(143, 97); + this.OptionSetXTitle.Name = "OptionSetXTitle"; + this.OptionSetXTitle.Size = new System.Drawing.Size(14, 13); + this.OptionSetXTitle.TabIndex = 138; + this.OptionSetXTitle.Text = "X"; // - // offsetLabelX + // constantThreeLabelY // - this.offsetLabelX.AutoSize = true; - this.offsetLabelX.Location = new System.Drawing.Point(43, 218); - this.offsetLabelX.Name = "offsetLabelX"; - this.offsetLabelX.Size = new System.Drawing.Size(35, 13); - this.offsetLabelX.TabIndex = 20; - this.offsetLabelX.Text = "Offset"; - this.offsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.constantThreeLabelY.AutoSize = true; + this.constantThreeLabelY.Location = new System.Drawing.Point(263, 303); + this.constantThreeLabelY.Name = "constantThreeLabelY"; + this.constantThreeLabelY.Size = new System.Drawing.Size(47, 13); + this.constantThreeLabelY.TabIndex = 137; + this.constantThreeLabelY.Text = "Midpoint"; // - // writeButton + // limitLabelY // - this.writeButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.writeButton.Location = new System.Drawing.Point(103, 377); - this.writeButton.Name = "writeButton"; - this.writeButton.Size = new System.Drawing.Size(92, 35); - this.writeButton.TabIndex = 23; - this.writeButton.Text = "Apply"; - this.writeButton.UseVisualStyleBackColor = true; + this.limitLabelY.AutoSize = true; + this.limitLabelY.Location = new System.Drawing.Point(263, 247); + this.limitLabelY.Name = "limitLabelY"; + this.limitLabelY.Size = new System.Drawing.Size(28, 13); + this.limitLabelY.TabIndex = 136; + this.limitLabelY.Text = "Limit"; // - // sensitivityBoxY + // offsetLabelY // - 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 = 1; + this.offsetLabelY.AutoSize = true; + this.offsetLabelY.Location = new System.Drawing.Point(263, 221); + this.offsetLabelY.Name = "offsetLabelY"; + this.offsetLabelY.Size = new System.Drawing.Size(35, 13); + this.offsetLabelY.TabIndex = 135; + this.offsetLabelY.Text = "Offset"; // - // capBoxY + // weightLabelY // - 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 = 17; + this.weightLabelY.AutoSize = true; + this.weightLabelY.Location = new System.Drawing.Point(263, 195); + this.weightLabelY.Name = "weightLabelY"; + this.weightLabelY.Size = new System.Drawing.Size(41, 13); + this.weightLabelY.TabIndex = 134; + this.weightLabelY.Text = "Weight"; // - // sensXYLock + // capLabelY // - this.sensXYLock.AutoSize = true; - this.sensXYLock.Checked = true; - this.sensXYLock.CheckState = System.Windows.Forms.CheckState.Checked; - 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 = 2; - this.sensXYLock.UseVisualStyleBackColor = true; + this.capLabelY.AutoSize = true; + this.capLabelY.Location = new System.Drawing.Point(263, 169); + this.capLabelY.Name = "capLabelY"; + this.capLabelY.Size = new System.Drawing.Size(26, 13); + this.capLabelY.TabIndex = 133; + this.capLabelY.Text = "Cap"; // - // LockXYLabel + // constantOneLabelY // - this.LockXYLabel.AutoSize = true; - this.LockXYLabel.Location = new System.Drawing.Point(255, 30); - this.LockXYLabel.Name = "LockXYLabel"; - this.LockXYLabel.Size = new System.Drawing.Size(60, 13); - this.LockXYLabel.TabIndex = 27; - this.LockXYLabel.Text = "Lock X && Y"; + this.constantOneLabelY.AutoSize = true; + this.constantOneLabelY.Location = new System.Drawing.Point(263, 143); + this.constantOneLabelY.Name = "constantOneLabelY"; + this.constantOneLabelY.Size = new System.Drawing.Size(66, 13); + this.constantOneLabelY.TabIndex = 132; + this.constantOneLabelY.Text = "Acceleration"; // - // VelocityChart + // ByComponentXYLock // - chartArea2.AxisX.Title = "Input Speed (count/ms)"; - chartArea2.AxisY.Title = "Output Speed (counts/ms)"; - chartArea2.Name = "ChartArea1"; - this.VelocityChart.ChartAreas.Add(chartArea2); - legend2.Name = "Legend1"; - this.VelocityChart.Legends.Add(legend2); - this.VelocityChart.Location = new System.Drawing.Point(482, 334); - this.VelocityChart.Name = "VelocityChart"; - series5.ChartArea = "ChartArea1"; - series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series5.Legend = "Legend1"; - series5.Name = "Output Velocity"; - series6.ChartArea = "ChartArea1"; - series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series6.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - series6.Legend = "Legend1"; - series6.Name = "Last Mouse Move"; - series7.ChartArea = "ChartArea1"; - series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series7.Legend = "Legend1"; - series7.Name = "Y: Output Velocity"; - series8.ChartArea = "ChartArea1"; - series8.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series8.IsVisibleInLegend = false; - series8.Legend = "Legend1"; - series8.Name = "Y: Last Mouse Move"; - this.VelocityChart.Series.Add(series5); - this.VelocityChart.Series.Add(series6); - this.VelocityChart.Series.Add(series7); - 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; - title2.Name = "Title"; - title2.Text = "Velocity"; - this.VelocityChart.Titles.Add(title2); + this.ByComponentXYLock.AutoSize = true; + this.ByComponentXYLock.Checked = true; + this.ByComponentXYLock.CheckState = System.Windows.Forms.CheckState.Checked; + this.ByComponentXYLock.Location = new System.Drawing.Point(283, 96); + this.ByComponentXYLock.Name = "ByComponentXYLock"; + this.ByComponentXYLock.Size = new System.Drawing.Size(15, 14); + this.ByComponentXYLock.TabIndex = 98; + this.ByComponentXYLock.UseVisualStyleBackColor = true; // - // GainChart + // MidpointActiveYLabel // - chartArea3.AxisX.Title = "Input Speed (counts/ms)"; - chartArea3.AxisY.Title = "Slope of Velocity Chart"; - chartArea3.Name = "ChartArea1"; - this.GainChart.ChartAreas.Add(chartArea3); - legend3.Name = "Legend1"; - this.GainChart.Legends.Add(legend3); - this.GainChart.Location = new System.Drawing.Point(482, 647); - this.GainChart.Name = "GainChart"; - series9.ChartArea = "ChartArea1"; - series9.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series9.Legend = "Legend1"; - series9.Name = "Velocity Gain"; - series10.ChartArea = "ChartArea1"; - series10.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series10.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - series10.Legend = "Legend1"; - series10.Name = "Last Mouse Move"; - series11.ChartArea = "ChartArea1"; - series11.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series11.Legend = "Legend1"; - series11.Name = "Y: Velocity Gain"; - series12.ChartArea = "ChartArea1"; - series12.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series12.IsVisibleInLegend = false; - series12.Legend = "Legend1"; - series12.Name = "Y: Last Mouse Move"; - this.GainChart.Series.Add(series9); - this.GainChart.Series.Add(series10); - this.GainChart.Series.Add(series11); - 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; - title3.Name = "Title"; - title3.Text = "Gain"; - this.GainChart.Titles.Add(title3); + this.MidpointActiveYLabel.AutoSize = true; + this.MidpointActiveYLabel.Location = new System.Drawing.Point(414, 303); + this.MidpointActiveYLabel.Name = "MidpointActiveYLabel"; + this.MidpointActiveYLabel.Size = new System.Drawing.Size(13, 13); + this.MidpointActiveYLabel.TabIndex = 131; + this.MidpointActiveYLabel.Text = "0"; // - // menuStrip1 + // LimitActiveYLabel // - this.menuStrip1.BackColor = System.Drawing.SystemColors.ControlLight; - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.graphsToolStripMenuItem, - this.advancedToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(1884, 24); - this.menuStrip1.TabIndex = 30; - this.menuStrip1.Text = "menuStrip1"; + this.LimitActiveYLabel.AutoSize = true; + this.LimitActiveYLabel.Location = new System.Drawing.Point(414, 247); + this.LimitActiveYLabel.Name = "LimitActiveYLabel"; + this.LimitActiveYLabel.Size = new System.Drawing.Size(13, 13); + this.LimitActiveYLabel.TabIndex = 130; + this.LimitActiveYLabel.Text = "0"; // - // graphsToolStripMenuItem + // OffsetActiveYLabel // - this.graphsToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.graphsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.scaleByDPIToolStripMenuItem, - this.showVelocityGainToolStripMenuItem, - this.showLastMouseMoveToolStripMenuItem}); - this.graphsToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.graphsToolStripMenuItem.Name = "graphsToolStripMenuItem"; - this.graphsToolStripMenuItem.Size = new System.Drawing.Size(53, 20); - this.graphsToolStripMenuItem.Text = "Charts"; + this.OffsetActiveYLabel.AutoSize = true; + this.OffsetActiveYLabel.Location = new System.Drawing.Point(414, 221); + this.OffsetActiveYLabel.Name = "OffsetActiveYLabel"; + this.OffsetActiveYLabel.Size = new System.Drawing.Size(13, 13); + this.OffsetActiveYLabel.TabIndex = 129; + this.OffsetActiveYLabel.Text = "0"; // - // scaleByDPIToolStripMenuItem + // AccelerationActiveLabelY // - this.scaleByDPIToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.dPIToolStripMenuItem, - this.pollRateToolStripMenuItem, - this.ScaleMenuItem}); - this.scaleByDPIToolStripMenuItem.Name = "scaleByDPIToolStripMenuItem"; - this.scaleByDPIToolStripMenuItem.Size = new System.Drawing.Size(201, 22); - this.scaleByDPIToolStripMenuItem.Text = "Scale by Mouse Settings"; + this.AccelerationActiveLabelY.AutoSize = true; + this.AccelerationActiveLabelY.Location = new System.Drawing.Point(414, 143); + this.AccelerationActiveLabelY.Name = "AccelerationActiveLabelY"; + this.AccelerationActiveLabelY.Size = new System.Drawing.Size(13, 13); + this.AccelerationActiveLabelY.TabIndex = 128; + this.AccelerationActiveLabelY.Text = "0"; // - // dPIToolStripMenuItem + // accelTypeDropY // - this.dPIToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.DPITextBox}); - this.dPIToolStripMenuItem.Name = "dPIToolStripMenuItem"; - this.dPIToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.dPIToolStripMenuItem.Text = "DPI"; - // - // DPITextBox - // - this.DPITextBox.Font = new System.Drawing.Font("Segoe UI", 9F); - this.DPITextBox.Name = "DPITextBox"; - this.DPITextBox.Size = new System.Drawing.Size(100, 23); - // - // pollRateToolStripMenuItem - // - this.pollRateToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.PollRateTextBox}); - this.pollRateToolStripMenuItem.Name = "pollRateToolStripMenuItem"; - this.pollRateToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.pollRateToolStripMenuItem.Text = "Poll Rate"; + this.accelTypeDropY.FormattingEnabled = true; + this.accelTypeDropY.Location = new System.Drawing.Point(332, 113); + this.accelTypeDropY.Name = "accelTypeDropY"; + this.accelTypeDropY.Size = new System.Drawing.Size(76, 21); + this.accelTypeDropY.TabIndex = 99; + this.accelTypeDropY.Text = "Accel Type"; // - // PollRateTextBox + // midpointBoxY // - this.PollRateTextBox.Font = new System.Drawing.Font("Segoe UI", 9F); - this.PollRateTextBox.Name = "PollRateTextBox"; - this.PollRateTextBox.Size = new System.Drawing.Size(100, 23); + this.midpointBoxY.Location = new System.Drawing.Point(332, 300); + this.midpointBoxY.Name = "midpointBoxY"; + this.midpointBoxY.Size = new System.Drawing.Size(76, 20); + this.midpointBoxY.TabIndex = 110; // - // ScaleMenuItem + // limitBoxY // - this.ScaleMenuItem.Name = "ScaleMenuItem"; - this.ScaleMenuItem.Size = new System.Drawing.Size(169, 22); - this.ScaleMenuItem.Text = "Re-scale by above"; + this.limitBoxY.Location = new System.Drawing.Point(332, 244); + this.limitBoxY.Name = "limitBoxY"; + this.limitBoxY.Size = new System.Drawing.Size(76, 20); + this.limitBoxY.TabIndex = 108; // - // showVelocityGainToolStripMenuItem + // offsetBoxY // - this.showVelocityGainToolStripMenuItem.Name = "showVelocityGainToolStripMenuItem"; - this.showVelocityGainToolStripMenuItem.Size = new System.Drawing.Size(201, 22); - this.showVelocityGainToolStripMenuItem.Text = "Show Velocity && Gain"; + this.offsetBoxY.Location = new System.Drawing.Point(332, 218); + this.offsetBoxY.Name = "offsetBoxY"; + this.offsetBoxY.Size = new System.Drawing.Size(76, 20); + this.offsetBoxY.TabIndex = 106; // - // showLastMouseMoveToolStripMenuItem + // accelerationBoxY // - this.showLastMouseMoveToolStripMenuItem.Checked = true; - this.showLastMouseMoveToolStripMenuItem.CheckOnClick = true; - this.showLastMouseMoveToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.showLastMouseMoveToolStripMenuItem.Name = "showLastMouseMoveToolStripMenuItem"; - this.showLastMouseMoveToolStripMenuItem.Size = new System.Drawing.Size(201, 22); - this.showLastMouseMoveToolStripMenuItem.Text = "Show Last Mouse Move"; + this.accelerationBoxY.Location = new System.Drawing.Point(332, 140); + this.accelerationBoxY.Name = "accelerationBoxY"; + this.accelerationBoxY.Size = new System.Drawing.Size(76, 20); + this.accelerationBoxY.TabIndex = 100; // - // advancedToolStripMenuItem + // MidpointActiveXLabel // - this.advancedToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.capStyleToolStripMenuItem, - this.offsetStyleToolStripMenuItem, - this.toolStripMenuItem1}); - this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem"; - this.advancedToolStripMenuItem.Size = new System.Drawing.Size(72, 20); - this.advancedToolStripMenuItem.Text = "Advanced"; + this.MidpointActiveXLabel.AutoSize = true; + this.MidpointActiveXLabel.Location = new System.Drawing.Point(197, 303); + this.MidpointActiveXLabel.Name = "MidpointActiveXLabel"; + this.MidpointActiveXLabel.Size = new System.Drawing.Size(13, 13); + this.MidpointActiveXLabel.TabIndex = 127; + this.MidpointActiveXLabel.Text = "0"; // - // capStyleToolStripMenuItem + // LimitActiveXLabel // - this.capStyleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.gainCapToolStripMenuItem, - this.legacyCapToolStripMenuItem}); - this.capStyleToolStripMenuItem.Name = "capStyleToolStripMenuItem"; - this.capStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); - this.capStyleToolStripMenuItem.Text = "Cap Style"; + this.LimitActiveXLabel.AutoSize = true; + this.LimitActiveXLabel.Location = new System.Drawing.Point(197, 247); + this.LimitActiveXLabel.Name = "LimitActiveXLabel"; + this.LimitActiveXLabel.Size = new System.Drawing.Size(13, 13); + this.LimitActiveXLabel.TabIndex = 126; + this.LimitActiveXLabel.Text = "0"; // - // gainCapToolStripMenuItem + // OffsetActiveXLabel // - this.gainCapToolStripMenuItem.Checked = true; - this.gainCapToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.gainCapToolStripMenuItem.Name = "gainCapToolStripMenuItem"; - this.gainCapToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.gainCapToolStripMenuItem.Text = "Gain (Default)"; + this.OffsetActiveXLabel.AutoSize = true; + this.OffsetActiveXLabel.Location = new System.Drawing.Point(197, 221); + this.OffsetActiveXLabel.Name = "OffsetActiveXLabel"; + this.OffsetActiveXLabel.Size = new System.Drawing.Size(13, 13); + this.OffsetActiveXLabel.TabIndex = 125; + this.OffsetActiveXLabel.Text = "0"; // - // legacyCapToolStripMenuItem + // CapActiveYLabel // - this.legacyCapToolStripMenuItem.Name = "legacyCapToolStripMenuItem"; - this.legacyCapToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.legacyCapToolStripMenuItem.Text = "Legacy"; + this.CapActiveYLabel.AutoSize = true; + this.CapActiveYLabel.Location = new System.Drawing.Point(414, 169); + this.CapActiveYLabel.Name = "CapActiveYLabel"; + this.CapActiveYLabel.Size = new System.Drawing.Size(13, 13); + this.CapActiveYLabel.TabIndex = 124; + this.CapActiveYLabel.Text = "0"; // - // offsetStyleToolStripMenuItem + // WeightActiveYLabel // - this.offsetStyleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.gainOffsetToolStripMenuItem, - this.legacyOffsetToolStripMenuItem}); - this.offsetStyleToolStripMenuItem.Name = "offsetStyleToolStripMenuItem"; - this.offsetStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); - this.offsetStyleToolStripMenuItem.Text = "Offset Style"; + this.WeightActiveYLabel.AutoSize = true; + this.WeightActiveYLabel.Location = new System.Drawing.Point(414, 195); + this.WeightActiveYLabel.Name = "WeightActiveYLabel"; + this.WeightActiveYLabel.Size = new System.Drawing.Size(13, 13); + this.WeightActiveYLabel.TabIndex = 123; + this.WeightActiveYLabel.Text = "0"; // - // gainOffsetToolStripMenuItem + // WeightActiveXLabel // - this.gainOffsetToolStripMenuItem.Name = "gainOffsetToolStripMenuItem"; - this.gainOffsetToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.gainOffsetToolStripMenuItem.Text = "Gain (Default)"; + this.WeightActiveXLabel.AutoSize = true; + this.WeightActiveXLabel.Location = new System.Drawing.Point(197, 195); + this.WeightActiveXLabel.Name = "WeightActiveXLabel"; + this.WeightActiveXLabel.Size = new System.Drawing.Size(13, 13); + this.WeightActiveXLabel.TabIndex = 122; + this.WeightActiveXLabel.Text = "0"; // - // legacyOffsetToolStripMenuItem + // CapActiveXLabel // - this.legacyOffsetToolStripMenuItem.Name = "legacyOffsetToolStripMenuItem"; - this.legacyOffsetToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.legacyOffsetToolStripMenuItem.Text = "Legacy"; + this.CapActiveXLabel.AutoSize = true; + this.CapActiveXLabel.Location = new System.Drawing.Point(197, 169); + this.CapActiveXLabel.Name = "CapActiveXLabel"; + this.CapActiveXLabel.Size = new System.Drawing.Size(13, 13); + this.CapActiveXLabel.TabIndex = 121; + this.CapActiveXLabel.Text = "0"; // - // toolStripMenuItem1 + // AccelerationActiveLabelX // - this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.wholeVectorToolStripMenuItem, - this.byVectorComponentToolStripMenuItem}); - this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(163, 22); - this.toolStripMenuItem1.Text = "Application Style"; + this.AccelerationActiveLabelX.AutoSize = true; + this.AccelerationActiveLabelX.Location = new System.Drawing.Point(197, 143); + this.AccelerationActiveLabelX.Name = "AccelerationActiveLabelX"; + this.AccelerationActiveLabelX.Size = new System.Drawing.Size(13, 13); + this.AccelerationActiveLabelX.TabIndex = 120; + this.AccelerationActiveLabelX.Text = "0"; // - // wholeVectorToolStripMenuItem + // AccelTypeActiveLabelX // - this.wholeVectorToolStripMenuItem.Checked = true; - this.wholeVectorToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.wholeVectorToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.wholeVectorToolStripMenuItem.Name = "wholeVectorToolStripMenuItem"; - this.wholeVectorToolStripMenuItem.Size = new System.Drawing.Size(154, 22); - this.wholeVectorToolStripMenuItem.Text = "Whole"; + this.AccelTypeActiveLabelX.AutoSize = true; + this.AccelTypeActiveLabelX.Location = new System.Drawing.Point(197, 116); + this.AccelTypeActiveLabelX.Name = "AccelTypeActiveLabelX"; + this.AccelTypeActiveLabelX.Size = new System.Drawing.Size(66, 13); + this.AccelTypeActiveLabelX.TabIndex = 119; + this.AccelTypeActiveLabelX.Text = "SigmoidGain"; // - // byVectorComponentToolStripMenuItem + // RotationActiveLabel // - this.byVectorComponentToolStripMenuItem.Name = "byVectorComponentToolStripMenuItem"; - this.byVectorComponentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); - this.byVectorComponentToolStripMenuItem.Text = "By Component"; + this.RotationActiveLabel.AutoSize = true; + this.RotationActiveLabel.Location = new System.Drawing.Point(197, 78); + this.RotationActiveLabel.Name = "RotationActiveLabel"; + this.RotationActiveLabel.Size = new System.Drawing.Size(13, 13); + this.RotationActiveLabel.TabIndex = 118; + this.RotationActiveLabel.Text = "0"; // - // AccelerationChartY + // SensitivityActiveYLabel // - chartArea4.AxisX.Title = "Input Speed (counts/ms)"; - chartArea4.AxisY.Title = "Ratio of Output to Input)"; - chartArea4.Name = "ChartArea1"; - this.AccelerationChartY.ChartAreas.Add(chartArea4); - legend4.Name = "Legend1"; - this.AccelerationChartY.Legends.Add(legend4); - this.AccelerationChartY.Location = new System.Drawing.Point(1186, 0); - this.AccelerationChartY.Name = "AccelerationChartY"; - series13.ChartArea = "ChartArea1"; - series13.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series13.Legend = "Legend1"; - series13.Name = "Accelerated Sensitivity"; - series14.ChartArea = "ChartArea1"; - series14.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series14.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - series14.Legend = "Legend1"; - series14.Name = "Last Mouse Move"; - series15.ChartArea = "ChartArea1"; - series15.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series15.IsVisibleInLegend = false; - series15.Legend = "Legend1"; - series15.Name = "Placeholder"; - this.AccelerationChartY.Series.Add(series13); - this.AccelerationChartY.Series.Add(series14); - 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; - title4.Name = "Title"; - title4.Text = "Sensitivity"; - this.AccelerationChartY.Titles.Add(title4); + this.SensitivityActiveYLabel.AutoSize = true; + this.SensitivityActiveYLabel.Location = new System.Drawing.Point(217, 52); + this.SensitivityActiveYLabel.Name = "SensitivityActiveYLabel"; + this.SensitivityActiveYLabel.Size = new System.Drawing.Size(14, 13); + this.SensitivityActiveYLabel.TabIndex = 117; + this.SensitivityActiveYLabel.Text = "Y"; // - // VelocityChartY + // SensitivityActiveXLabel // - chartArea5.AxisX.Title = "Input Speed (count/ms)"; - chartArea5.AxisY.Title = "Output Speed (counts/ms)"; - chartArea5.Name = "ChartArea1"; - this.VelocityChartY.ChartAreas.Add(chartArea5); - legend5.Name = "Legend1"; - this.VelocityChartY.Legends.Add(legend5); - this.VelocityChartY.Location = new System.Drawing.Point(1186, 334); - this.VelocityChartY.Name = "VelocityChartY"; - series16.ChartArea = "ChartArea1"; - series16.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series16.Legend = "Legend1"; - series16.Name = "Output Velocity"; - series17.ChartArea = "ChartArea1"; - series17.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series17.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - series17.Legend = "Legend1"; - series17.Name = "Last Mouse Move"; - series18.ChartArea = "ChartArea1"; - series18.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series18.IsVisibleInLegend = false; - series18.Legend = "Legend1"; - series18.Name = "Placeholder"; - this.VelocityChartY.Series.Add(series16); - this.VelocityChartY.Series.Add(series17); - 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; - title5.Name = "Title"; - title5.Text = "Velocity"; - this.VelocityChartY.Titles.Add(title5); + this.SensitivityActiveXLabel.AutoSize = true; + this.SensitivityActiveXLabel.Location = new System.Drawing.Point(188, 52); + this.SensitivityActiveXLabel.Name = "SensitivityActiveXLabel"; + this.SensitivityActiveXLabel.Size = new System.Drawing.Size(14, 13); + this.SensitivityActiveXLabel.TabIndex = 116; + this.SensitivityActiveXLabel.Text = "X"; // - // GainChartY + // ActiveValueTitle // - chartArea6.AxisX.Title = "Input Speed (counts/ms)"; - chartArea6.AxisY.Title = "Slope of Velocity Chart"; - chartArea6.Name = "ChartArea1"; - this.GainChartY.ChartAreas.Add(chartArea6); - legend6.Name = "Legend1"; - this.GainChartY.Legends.Add(legend6); - this.GainChartY.Location = new System.Drawing.Point(1186, 647); - this.GainChartY.Name = "GainChartY"; - series19.ChartArea = "ChartArea1"; - series19.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series19.Legend = "Legend1"; - series19.Name = "Velocity Gain"; - series20.ChartArea = "ChartArea1"; - series20.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; - series20.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - series20.Legend = "Legend1"; - series20.Name = "Last Mouse Move"; - series21.ChartArea = "ChartArea1"; - series21.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series21.IsVisibleInLegend = false; - series21.Legend = "Legend1"; - series21.Name = "Placeholder"; - this.GainChartY.Series.Add(series19); - this.GainChartY.Series.Add(series20); - 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; - title6.Name = "Title"; - title6.Text = "Gain"; - this.GainChartY.Titles.Add(title6); + this.ActiveValueTitle.AutoSize = true; + this.ActiveValueTitle.Location = new System.Drawing.Point(188, 29); + this.ActiveValueTitle.Name = "ActiveValueTitle"; + this.ActiveValueTitle.Size = new System.Drawing.Size(41, 13); + this.ActiveValueTitle.TabIndex = 115; + this.ActiveValueTitle.Text = "Current"; // // MouseLabel // this.MouseLabel.AutoSize = true; - this.MouseLabel.Location = new System.Drawing.Point(1, 24); + this.MouseLabel.Location = new System.Drawing.Point(2, 27); this.MouseLabel.Name = "MouseLabel"; this.MouseLabel.Size = new System.Drawing.Size(80, 13); - this.MouseLabel.TabIndex = 34; + this.MouseLabel.TabIndex = 114; this.MouseLabel.Text = "Last (x, y): (x, y)"; // - // ActiveValueTitle + // LockXYLabel // - this.ActiveValueTitle.AutoSize = true; - this.ActiveValueTitle.Location = new System.Drawing.Point(187, 30); - this.ActiveValueTitle.Name = "ActiveValueTitle"; - this.ActiveValueTitle.Size = new System.Drawing.Size(41, 13); - this.ActiveValueTitle.TabIndex = 35; - this.ActiveValueTitle.Text = "Current"; + this.LockXYLabel.AutoSize = true; + this.LockXYLabel.Location = new System.Drawing.Point(256, 29); + this.LockXYLabel.Name = "LockXYLabel"; + this.LockXYLabel.Size = new System.Drawing.Size(60, 13); + this.LockXYLabel.TabIndex = 113; + this.LockXYLabel.Text = "Lock X && Y"; // - // SensitivityActiveXLabel + // sensXYLock // - this.SensitivityActiveXLabel.AutoSize = true; - this.SensitivityActiveXLabel.Location = new System.Drawing.Point(187, 49); - this.SensitivityActiveXLabel.Name = "SensitivityActiveXLabel"; - this.SensitivityActiveXLabel.Size = new System.Drawing.Size(14, 13); - this.SensitivityActiveXLabel.TabIndex = 36; - this.SensitivityActiveXLabel.Text = "X"; + this.sensXYLock.AutoSize = true; + this.sensXYLock.Checked = true; + this.sensXYLock.CheckState = System.Windows.Forms.CheckState.Checked; + this.sensXYLock.Location = new System.Drawing.Point(283, 49); + this.sensXYLock.Name = "sensXYLock"; + this.sensXYLock.Size = new System.Drawing.Size(15, 14); + this.sensXYLock.TabIndex = 82; + this.sensXYLock.UseVisualStyleBackColor = true; // - // SensitivityActiveYLabel + // capBoxY // - this.SensitivityActiveYLabel.AutoSize = true; - this.SensitivityActiveYLabel.Location = new System.Drawing.Point(216, 49); - this.SensitivityActiveYLabel.Name = "SensitivityActiveYLabel"; - this.SensitivityActiveYLabel.Size = new System.Drawing.Size(14, 13); - this.SensitivityActiveYLabel.TabIndex = 37; - this.SensitivityActiveYLabel.Text = "Y"; - // - // RotationActiveLabel - // - this.RotationActiveLabel.AutoSize = true; - this.RotationActiveLabel.Location = new System.Drawing.Point(196, 75); - this.RotationActiveLabel.Name = "RotationActiveLabel"; - this.RotationActiveLabel.Size = new System.Drawing.Size(13, 13); - this.RotationActiveLabel.TabIndex = 38; - this.RotationActiveLabel.Text = "0"; + this.capBoxY.Location = new System.Drawing.Point(332, 166); + this.capBoxY.Name = "capBoxY"; + this.capBoxY.Size = new System.Drawing.Size(76, 20); + this.capBoxY.TabIndex = 103; // - // AccelTypeActiveLabelX + // sensitivityBoxY // - this.AccelTypeActiveLabelX.AutoSize = true; - this.AccelTypeActiveLabelX.Location = new System.Drawing.Point(196, 113); - this.AccelTypeActiveLabelX.Name = "AccelTypeActiveLabelX"; - this.AccelTypeActiveLabelX.Size = new System.Drawing.Size(66, 13); - this.AccelTypeActiveLabelX.TabIndex = 39; - this.AccelTypeActiveLabelX.Text = "SigmoidGain"; + this.sensitivityBoxY.Location = new System.Drawing.Point(148, 49); + this.sensitivityBoxY.Name = "sensitivityBoxY"; + this.sensitivityBoxY.Size = new System.Drawing.Size(34, 20); + this.sensitivityBoxY.TabIndex = 81; // - // AccelerationActiveLabelX + // writeButton // - this.AccelerationActiveLabelX.AutoSize = true; - this.AccelerationActiveLabelX.Location = new System.Drawing.Point(196, 140); - this.AccelerationActiveLabelX.Name = "AccelerationActiveLabelX"; - this.AccelerationActiveLabelX.Size = new System.Drawing.Size(13, 13); - this.AccelerationActiveLabelX.TabIndex = 40; - this.AccelerationActiveLabelX.Text = "0"; + this.writeButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.writeButton.Location = new System.Drawing.Point(94, 380); + this.writeButton.Name = "writeButton"; + this.writeButton.Size = new System.Drawing.Size(92, 35); + this.writeButton.TabIndex = 111; + this.writeButton.Text = "Apply"; + this.writeButton.UseVisualStyleBackColor = true; // - // CapActiveXLabel + // offsetLabelX // - this.CapActiveXLabel.AutoSize = true; - this.CapActiveXLabel.Location = new System.Drawing.Point(196, 166); - this.CapActiveXLabel.Name = "CapActiveXLabel"; - this.CapActiveXLabel.Size = new System.Drawing.Size(13, 13); - this.CapActiveXLabel.TabIndex = 41; - this.CapActiveXLabel.Text = "0"; + this.offsetLabelX.AutoSize = true; + this.offsetLabelX.Location = new System.Drawing.Point(37, 221); + this.offsetLabelX.Name = "offsetLabelX"; + this.offsetLabelX.Size = new System.Drawing.Size(35, 13); + this.offsetLabelX.TabIndex = 107; + this.offsetLabelX.Text = "Offset"; + this.offsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // WeightActiveXLabel + // offsetBoxX // - this.WeightActiveXLabel.AutoSize = true; - this.WeightActiveXLabel.Location = new System.Drawing.Point(196, 192); - this.WeightActiveXLabel.Name = "WeightActiveXLabel"; - this.WeightActiveXLabel.Size = new System.Drawing.Size(13, 13); - this.WeightActiveXLabel.TabIndex = 42; - this.WeightActiveXLabel.Text = "0"; + this.offsetBoxX.Location = new System.Drawing.Point(106, 218); + this.offsetBoxX.Name = "offsetBoxX"; + this.offsetBoxX.Size = new System.Drawing.Size(76, 20); + this.offsetBoxX.TabIndex = 92; // - // WeightActiveYLabel + // constantThreeLabelX // - this.WeightActiveYLabel.AutoSize = true; - this.WeightActiveYLabel.Location = new System.Drawing.Point(413, 192); - this.WeightActiveYLabel.Name = "WeightActiveYLabel"; - this.WeightActiveYLabel.Size = new System.Drawing.Size(13, 13); - this.WeightActiveYLabel.TabIndex = 43; - this.WeightActiveYLabel.Text = "0"; + this.constantThreeLabelX.AutoSize = true; + this.constantThreeLabelX.Location = new System.Drawing.Point(37, 303); + this.constantThreeLabelX.Name = "constantThreeLabelX"; + this.constantThreeLabelX.Size = new System.Drawing.Size(47, 13); + this.constantThreeLabelX.TabIndex = 105; + this.constantThreeLabelX.Text = "Midpoint"; + this.constantThreeLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // CapActiveYLabel + // midpointBoxX // - this.CapActiveYLabel.AutoSize = true; - this.CapActiveYLabel.Location = new System.Drawing.Point(413, 166); - this.CapActiveYLabel.Name = "CapActiveYLabel"; - this.CapActiveYLabel.Size = new System.Drawing.Size(13, 13); - this.CapActiveYLabel.TabIndex = 44; - this.CapActiveYLabel.Text = "0"; + this.midpointBoxX.Location = new System.Drawing.Point(106, 300); + this.midpointBoxX.Name = "midpointBoxX"; + this.midpointBoxX.Size = new System.Drawing.Size(76, 20); + this.midpointBoxX.TabIndex = 96; // - // OffsetActiveXLabel + // limitLabelX // - this.OffsetActiveXLabel.AutoSize = true; - this.OffsetActiveXLabel.Location = new System.Drawing.Point(196, 218); - this.OffsetActiveXLabel.Name = "OffsetActiveXLabel"; - this.OffsetActiveXLabel.Size = new System.Drawing.Size(13, 13); - this.OffsetActiveXLabel.TabIndex = 45; - this.OffsetActiveXLabel.Text = "0"; + this.limitLabelX.AutoSize = true; + this.limitLabelX.Location = new System.Drawing.Point(37, 247); + this.limitLabelX.Name = "limitLabelX"; + this.limitLabelX.Size = new System.Drawing.Size(28, 13); + this.limitLabelX.TabIndex = 101; + this.limitLabelX.Text = "Limit"; + this.limitLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // LimitActiveXLabel + // limitBoxX // - this.LimitActiveXLabel.AutoSize = true; - this.LimitActiveXLabel.Location = new System.Drawing.Point(196, 244); - this.LimitActiveXLabel.Name = "LimitActiveXLabel"; - this.LimitActiveXLabel.Size = new System.Drawing.Size(13, 13); - this.LimitActiveXLabel.TabIndex = 46; - this.LimitActiveXLabel.Text = "0"; + this.limitBoxX.Location = new System.Drawing.Point(106, 244); + this.limitBoxX.Name = "limitBoxX"; + this.limitBoxX.Size = new System.Drawing.Size(76, 20); + this.limitBoxX.TabIndex = 93; // - // MidpointActiveXLabel + // weightBoxY // - this.MidpointActiveXLabel.AutoSize = true; - this.MidpointActiveXLabel.Location = new System.Drawing.Point(196, 300); - this.MidpointActiveXLabel.Name = "MidpointActiveXLabel"; - this.MidpointActiveXLabel.Size = new System.Drawing.Size(13, 13); - this.MidpointActiveXLabel.TabIndex = 47; - this.MidpointActiveXLabel.Text = "0"; + this.weightBoxY.Location = new System.Drawing.Point(332, 192); + this.weightBoxY.Name = "weightBoxY"; + this.weightBoxY.Size = new System.Drawing.Size(76, 20); + this.weightBoxY.TabIndex = 104; // - // accelerationBoxY + // weightLabelX // - 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 = 15; + this.weightLabelX.AutoSize = true; + this.weightLabelX.Location = new System.Drawing.Point(37, 195); + this.weightLabelX.Name = "weightLabelX"; + this.weightLabelX.Size = new System.Drawing.Size(41, 13); + this.weightLabelX.TabIndex = 97; + this.weightLabelX.Text = "Weight"; + this.weightLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // offsetBoxY + // weightBoxX // - 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 = 19; + this.weightBoxX.Location = new System.Drawing.Point(106, 192); + this.weightBoxX.Name = "weightBoxX"; + this.weightBoxX.Size = new System.Drawing.Size(76, 20); + this.weightBoxX.TabIndex = 90; // - // limitBoxY + // capLabelX // - 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 = 20; + this.capLabelX.AutoSize = true; + this.capLabelX.Location = new System.Drawing.Point(37, 169); + this.capLabelX.Name = "capLabelX"; + this.capLabelX.Size = new System.Drawing.Size(26, 13); + this.capLabelX.TabIndex = 94; + this.capLabelX.Text = "Cap"; + this.capLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // midpointBoxY + // capBoxX // - 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 = 22; + this.capBoxX.Location = new System.Drawing.Point(106, 166); + this.capBoxX.Name = "capBoxX"; + this.capBoxX.Size = new System.Drawing.Size(76, 20); + this.capBoxX.TabIndex = 89; // - // accelTypeDropY + // constantOneLabelX // - this.accelTypeDropY.FormattingEnabled = true; - 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 = 14; - this.accelTypeDropY.Text = "Accel Type"; + this.constantOneLabelX.AutoSize = true; + this.constantOneLabelX.Location = new System.Drawing.Point(37, 143); + this.constantOneLabelX.Name = "constantOneLabelX"; + this.constantOneLabelX.Size = new System.Drawing.Size(66, 13); + this.constantOneLabelX.TabIndex = 91; + this.constantOneLabelX.Text = "Acceleration"; + this.constantOneLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // AccelerationActiveLabelY + // accelerationBoxX // - this.AccelerationActiveLabelY.AutoSize = true; - this.AccelerationActiveLabelY.Location = new System.Drawing.Point(413, 140); - this.AccelerationActiveLabelY.Name = "AccelerationActiveLabelY"; - this.AccelerationActiveLabelY.Size = new System.Drawing.Size(13, 13); - this.AccelerationActiveLabelY.TabIndex = 53; - this.AccelerationActiveLabelY.Text = "0"; + this.accelerationBoxX.Location = new System.Drawing.Point(106, 140); + this.accelerationBoxX.Name = "accelerationBoxX"; + this.accelerationBoxX.Size = new System.Drawing.Size(76, 20); + this.accelerationBoxX.TabIndex = 86; // - // OffsetActiveYLabel + // rotationLabel // - this.OffsetActiveYLabel.AutoSize = true; - this.OffsetActiveYLabel.Location = new System.Drawing.Point(413, 218); - this.OffsetActiveYLabel.Name = "OffsetActiveYLabel"; - this.OffsetActiveYLabel.Size = new System.Drawing.Size(13, 13); - this.OffsetActiveYLabel.TabIndex = 54; - this.OffsetActiveYLabel.Text = "0"; + this.rotationLabel.AutoSize = true; + this.rotationLabel.Location = new System.Drawing.Point(35, 78); + this.rotationLabel.Name = "rotationLabel"; + this.rotationLabel.Size = new System.Drawing.Size(47, 13); + this.rotationLabel.TabIndex = 87; + this.rotationLabel.Text = "Rotation"; // - // LimitActiveYLabel + // rotationBox // - this.LimitActiveYLabel.AutoSize = true; - this.LimitActiveYLabel.Location = new System.Drawing.Point(413, 244); - this.LimitActiveYLabel.Name = "LimitActiveYLabel"; - this.LimitActiveYLabel.Size = new System.Drawing.Size(13, 13); - this.LimitActiveYLabel.TabIndex = 55; - this.LimitActiveYLabel.Text = "0"; + this.rotationBox.Location = new System.Drawing.Point(106, 75); + this.rotationBox.Name = "rotationBox"; + this.rotationBox.Size = new System.Drawing.Size(76, 20); + this.rotationBox.TabIndex = 83; // - // MidpointActiveYLabel + // sensitivityLabel // - this.MidpointActiveYLabel.AutoSize = true; - this.MidpointActiveYLabel.Location = new System.Drawing.Point(413, 300); - this.MidpointActiveYLabel.Name = "MidpointActiveYLabel"; - this.MidpointActiveYLabel.Size = new System.Drawing.Size(13, 13); - this.MidpointActiveYLabel.TabIndex = 56; - this.MidpointActiveYLabel.Text = "0"; + this.sensitivityLabel.AutoSize = true; + this.sensitivityLabel.Location = new System.Drawing.Point(25, 52); + this.sensitivityLabel.Name = "sensitivityLabel"; + this.sensitivityLabel.Size = new System.Drawing.Size(54, 13); + this.sensitivityLabel.TabIndex = 85; + this.sensitivityLabel.Text = "Sensitivity"; // - // ByComponentXYLock + // sensitivityBoxX // - this.ByComponentXYLock.AutoSize = true; - this.ByComponentXYLock.Checked = true; - this.ByComponentXYLock.CheckState = System.Windows.Forms.CheckState.Checked; - 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 = 13; - this.ByComponentXYLock.UseVisualStyleBackColor = true; + this.sensitivityBoxX.Location = new System.Drawing.Point(106, 49); + this.sensitivityBoxX.Name = "sensitivityBoxX"; + this.sensitivityBoxX.Size = new System.Drawing.Size(34, 20); + this.sensitivityBoxX.TabIndex = 80; // - // constantOneLabelY + // accelTypeDropX // - this.constantOneLabelY.AutoSize = true; - this.constantOneLabelY.Location = new System.Drawing.Point(258, 140); - this.constantOneLabelY.Name = "constantOneLabelY"; - this.constantOneLabelY.Size = new System.Drawing.Size(66, 13); - this.constantOneLabelY.TabIndex = 58; - this.constantOneLabelY.Text = "Acceleration"; + this.accelTypeDropX.FormattingEnabled = true; + this.accelTypeDropX.Location = new System.Drawing.Point(106, 113); + this.accelTypeDropX.Name = "accelTypeDropX"; + this.accelTypeDropX.Size = new System.Drawing.Size(76, 21); + this.accelTypeDropX.TabIndex = 84; + this.accelTypeDropX.Text = "Accel Type"; // - // capLabelY + // menuStrip1 // - this.capLabelY.AutoSize = true; - this.capLabelY.Location = new System.Drawing.Point(279, 166); - this.capLabelY.Name = "capLabelY"; - this.capLabelY.Size = new System.Drawing.Size(26, 13); - this.capLabelY.TabIndex = 59; - this.capLabelY.Text = "Cap"; + this.menuStrip1.BackColor = System.Drawing.SystemColors.ControlLight; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.graphsToolStripMenuItem, + this.advancedToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(483, 24); + this.menuStrip1.TabIndex = 31; + this.menuStrip1.Text = "menuStrip1"; // - // weightLabelY + // graphsToolStripMenuItem // - this.weightLabelY.AutoSize = true; - this.weightLabelY.Location = new System.Drawing.Point(264, 192); - this.weightLabelY.Name = "weightLabelY"; - this.weightLabelY.Size = new System.Drawing.Size(41, 13); - this.weightLabelY.TabIndex = 60; - this.weightLabelY.Text = "Weight"; + this.graphsToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.graphsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.scaleByDPIToolStripMenuItem, + this.showVelocityGainToolStripMenuItem, + this.showLastMouseMoveToolStripMenuItem}); + this.graphsToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.graphsToolStripMenuItem.Name = "graphsToolStripMenuItem"; + this.graphsToolStripMenuItem.Size = new System.Drawing.Size(53, 20); + this.graphsToolStripMenuItem.Text = "Charts"; // - // offsetLabelY + // scaleByDPIToolStripMenuItem // - this.offsetLabelY.AutoSize = true; - this.offsetLabelY.Location = new System.Drawing.Point(270, 218); - this.offsetLabelY.Name = "offsetLabelY"; - this.offsetLabelY.Size = new System.Drawing.Size(35, 13); - this.offsetLabelY.TabIndex = 61; - this.offsetLabelY.Text = "Offset"; + this.scaleByDPIToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.dPIToolStripMenuItem, + this.pollRateToolStripMenuItem, + this.ScaleMenuItem}); + this.scaleByDPIToolStripMenuItem.Name = "scaleByDPIToolStripMenuItem"; + this.scaleByDPIToolStripMenuItem.Size = new System.Drawing.Size(201, 22); + this.scaleByDPIToolStripMenuItem.Text = "Scale by Mouse Settings"; // - // limitLabelY + // dPIToolStripMenuItem // - this.limitLabelY.AutoSize = true; - this.limitLabelY.Location = new System.Drawing.Point(264, 244); - this.limitLabelY.Name = "limitLabelY"; - this.limitLabelY.Size = new System.Drawing.Size(28, 13); - this.limitLabelY.TabIndex = 62; - this.limitLabelY.Text = "Limit"; + this.dPIToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.DPITextBox}); + this.dPIToolStripMenuItem.Name = "dPIToolStripMenuItem"; + this.dPIToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + this.dPIToolStripMenuItem.Text = "DPI"; // - // constantThreeLabelY + // DPITextBox // - this.constantThreeLabelY.AutoSize = true; - this.constantThreeLabelY.Location = new System.Drawing.Point(264, 300); - this.constantThreeLabelY.Name = "constantThreeLabelY"; - this.constantThreeLabelY.Size = new System.Drawing.Size(47, 13); - this.constantThreeLabelY.TabIndex = 63; - this.constantThreeLabelY.Text = "Midpoint"; + this.DPITextBox.Font = new System.Drawing.Font("Segoe UI", 9F); + this.DPITextBox.Name = "DPITextBox"; + this.DPITextBox.Size = new System.Drawing.Size(100, 23); // - // OptionSetXTitle + // pollRateToolStripMenuItem // - this.OptionSetXTitle.AutoSize = true; - this.OptionSetXTitle.Location = new System.Drawing.Point(142, 94); - this.OptionSetXTitle.Name = "OptionSetXTitle"; - this.OptionSetXTitle.Size = new System.Drawing.Size(14, 13); - this.OptionSetXTitle.TabIndex = 64; - this.OptionSetXTitle.Text = "X"; + this.pollRateToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.PollRateTextBox}); + this.pollRateToolStripMenuItem.Name = "pollRateToolStripMenuItem"; + this.pollRateToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + this.pollRateToolStripMenuItem.Text = "Poll Rate"; // - // OptionSetYTitle + // PollRateTextBox // - this.OptionSetYTitle.AutoSize = true; - this.OptionSetYTitle.Location = new System.Drawing.Point(359, 94); - this.OptionSetYTitle.Name = "OptionSetYTitle"; - this.OptionSetYTitle.Size = new System.Drawing.Size(14, 13); - this.OptionSetYTitle.TabIndex = 65; - this.OptionSetYTitle.Text = "Y"; + this.PollRateTextBox.Font = new System.Drawing.Font("Segoe UI", 9F); + this.PollRateTextBox.Name = "PollRateTextBox"; + this.PollRateTextBox.Size = new System.Drawing.Size(100, 23); // - // AccelTypeActiveLabelY + // ScaleMenuItem // - this.AccelTypeActiveLabelY.AutoSize = true; - this.AccelTypeActiveLabelY.Location = new System.Drawing.Point(413, 113); - this.AccelTypeActiveLabelY.Name = "AccelTypeActiveLabelY"; - this.AccelTypeActiveLabelY.Size = new System.Drawing.Size(66, 13); - this.AccelTypeActiveLabelY.TabIndex = 66; - this.AccelTypeActiveLabelY.Text = "SigmoidGain"; + this.ScaleMenuItem.Name = "ScaleMenuItem"; + this.ScaleMenuItem.Size = new System.Drawing.Size(169, 22); + this.ScaleMenuItem.Text = "Re-scale by above"; // - // ActiveValueTitleY + // showVelocityGainToolStripMenuItem // - this.ActiveValueTitleY.AutoSize = true; - this.ActiveValueTitleY.Location = new System.Drawing.Point(428, 30); - this.ActiveValueTitleY.Name = "ActiveValueTitleY"; - this.ActiveValueTitleY.Size = new System.Drawing.Size(41, 13); - this.ActiveValueTitleY.TabIndex = 67; - this.ActiveValueTitleY.Text = "Current"; + this.showVelocityGainToolStripMenuItem.Name = "showVelocityGainToolStripMenuItem"; + this.showVelocityGainToolStripMenuItem.Size = new System.Drawing.Size(201, 22); + this.showVelocityGainToolStripMenuItem.Text = "Show Velocity && Gain"; // - // expLabelY + // showLastMouseMoveToolStripMenuItem // - this.expLabelY.AutoSize = true; - this.expLabelY.Location = new System.Drawing.Point(264, 273); - this.expLabelY.Name = "expLabelY"; - this.expLabelY.Size = new System.Drawing.Size(52, 13); - this.expLabelY.TabIndex = 73; - this.expLabelY.Text = "Exponent"; + this.showLastMouseMoveToolStripMenuItem.Checked = true; + this.showLastMouseMoveToolStripMenuItem.CheckOnClick = true; + this.showLastMouseMoveToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.showLastMouseMoveToolStripMenuItem.Name = "showLastMouseMoveToolStripMenuItem"; + this.showLastMouseMoveToolStripMenuItem.Size = new System.Drawing.Size(201, 22); + this.showLastMouseMoveToolStripMenuItem.Text = "Show Last Mouse Move"; // - // ExpActiveYLabel + // advancedToolStripMenuItem // - this.ExpActiveYLabel.AutoSize = true; - this.ExpActiveYLabel.Location = new System.Drawing.Point(413, 273); - this.ExpActiveYLabel.Name = "ExpActiveYLabel"; - this.ExpActiveYLabel.Size = new System.Drawing.Size(13, 13); - this.ExpActiveYLabel.TabIndex = 72; - this.ExpActiveYLabel.Text = "0"; + this.advancedToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.capStyleToolStripMenuItem, + this.offsetStyleToolStripMenuItem, + this.toolStripMenuItem1}); + this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem"; + this.advancedToolStripMenuItem.Size = new System.Drawing.Size(72, 20); + this.advancedToolStripMenuItem.Text = "Advanced"; // - // expBoxY + // capStyleToolStripMenuItem // - 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 = 21; + this.capStyleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.gainCapToolStripMenuItem, + this.legacyCapToolStripMenuItem}); + this.capStyleToolStripMenuItem.Name = "capStyleToolStripMenuItem"; + this.capStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); + this.capStyleToolStripMenuItem.Text = "Cap Style"; // - // ExpActiveXLabel + // gainCapToolStripMenuItem // - this.ExpActiveXLabel.AutoSize = true; - this.ExpActiveXLabel.Location = new System.Drawing.Point(196, 273); - this.ExpActiveXLabel.Name = "ExpActiveXLabel"; - this.ExpActiveXLabel.Size = new System.Drawing.Size(13, 13); - this.ExpActiveXLabel.TabIndex = 70; - this.ExpActiveXLabel.Text = "0"; + this.gainCapToolStripMenuItem.Checked = true; + this.gainCapToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.gainCapToolStripMenuItem.Name = "gainCapToolStripMenuItem"; + this.gainCapToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.gainCapToolStripMenuItem.Text = "Gain (Default)"; // - // expLabelX + // legacyCapToolStripMenuItem // - this.expLabelX.AutoSize = true; - this.expLabelX.Location = new System.Drawing.Point(24, 273); - this.expLabelX.Name = "expLabelX"; - this.expLabelX.Size = new System.Drawing.Size(52, 13); - this.expLabelX.TabIndex = 69; - this.expLabelX.Text = "Exponent"; - this.expLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.legacyCapToolStripMenuItem.Name = "legacyCapToolStripMenuItem"; + this.legacyCapToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.legacyCapToolStripMenuItem.Text = "Legacy"; // - // expBoxX + // offsetStyleToolStripMenuItem // - 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 = 11; + this.offsetStyleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.gainOffsetToolStripMenuItem, + this.legacyOffsetToolStripMenuItem}); + this.offsetStyleToolStripMenuItem.Name = "offsetStyleToolStripMenuItem"; + this.offsetStyleToolStripMenuItem.Size = new System.Drawing.Size(163, 22); + this.offsetStyleToolStripMenuItem.Text = "Offset Style"; // - // scaleLabelY + // gainOffsetToolStripMenuItem // - this.scaleLabelY.AutoSize = true; - this.scaleLabelY.Location = new System.Drawing.Point(264, 330); - this.scaleLabelY.Name = "scaleLabelY"; - this.scaleLabelY.Size = new System.Drawing.Size(34, 13); - this.scaleLabelY.TabIndex = 79; - this.scaleLabelY.Text = "Scale"; + this.gainOffsetToolStripMenuItem.Name = "gainOffsetToolStripMenuItem"; + this.gainOffsetToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.gainOffsetToolStripMenuItem.Text = "Gain (Default)"; // - // ScaleActiveYLabel + // legacyOffsetToolStripMenuItem // - this.ScaleActiveYLabel.AutoSize = true; - this.ScaleActiveYLabel.Location = new System.Drawing.Point(413, 330); - this.ScaleActiveYLabel.Name = "ScaleActiveYLabel"; - this.ScaleActiveYLabel.Size = new System.Drawing.Size(13, 13); - this.ScaleActiveYLabel.TabIndex = 78; - this.ScaleActiveYLabel.Text = "0"; + this.legacyOffsetToolStripMenuItem.Name = "legacyOffsetToolStripMenuItem"; + this.legacyOffsetToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.legacyOffsetToolStripMenuItem.Text = "Legacy"; // - // scaleBoxY + // toolStripMenuItem1 // - 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 = 16; + this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.wholeVectorToolStripMenuItem, + this.byVectorComponentToolStripMenuItem}); + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(163, 22); + this.toolStripMenuItem1.Text = "Application Style"; // - // ScaleActiveXLabel + // wholeVectorToolStripMenuItem // - this.ScaleActiveXLabel.AutoSize = true; - this.ScaleActiveXLabel.Location = new System.Drawing.Point(196, 330); - this.ScaleActiveXLabel.Name = "ScaleActiveXLabel"; - this.ScaleActiveXLabel.Size = new System.Drawing.Size(13, 13); - this.ScaleActiveXLabel.TabIndex = 76; - this.ScaleActiveXLabel.Text = "0"; + this.wholeVectorToolStripMenuItem.Checked = true; + this.wholeVectorToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.wholeVectorToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.wholeVectorToolStripMenuItem.Name = "wholeVectorToolStripMenuItem"; + this.wholeVectorToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.wholeVectorToolStripMenuItem.Text = "Whole"; // - // scaleLabelX + // byVectorComponentToolStripMenuItem // - this.scaleLabelX.AutoSize = true; - this.scaleLabelX.Location = new System.Drawing.Point(34, 330); - this.scaleLabelX.Name = "scaleLabelX"; - this.scaleLabelX.Size = new System.Drawing.Size(34, 13); - this.scaleLabelX.TabIndex = 75; - this.scaleLabelX.Text = "Scale"; - this.scaleLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.byVectorComponentToolStripMenuItem.Name = "byVectorComponentToolStripMenuItem"; + this.byVectorComponentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.byVectorComponentToolStripMenuItem.Text = "By Component"; // - // scaleBoxX + // panel2 + // + this.panel2.AutoScroll = true; + this.panel2.Controls.Add(this.GainChartY); + this.panel2.Controls.Add(this.VelocityChartY); + this.panel2.Controls.Add(this.AccelerationChartY); + this.panel2.Controls.Add(this.GainChart); + this.panel2.Controls.Add(this.VelocityChart); + this.panel2.Controls.Add(this.AccelerationChart); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(483, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(1401, 956); + this.panel2.TabIndex = 35; // - 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 = 6; + // GainChartY // - // toggleButton + chartArea1.AxisX.Title = "Input Speed (counts/ms)"; + chartArea1.AxisY.Title = "Slope of Velocity Chart"; + chartArea1.Name = "ChartArea1"; + this.GainChartY.ChartAreas.Add(chartArea1); + legend1.Name = "Legend1"; + this.GainChartY.Legends.Add(legend1); + this.GainChartY.Location = new System.Drawing.Point(699, 645); + this.GainChartY.Name = "GainChartY"; + series1.ChartArea = "ChartArea1"; + series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series1.Legend = "Legend1"; + series1.Name = "Velocity Gain"; + series2.ChartArea = "ChartArea1"; + series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + series2.Legend = "Legend1"; + series2.Name = "Last Mouse Move"; + series3.ChartArea = "ChartArea1"; + series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series3.IsVisibleInLegend = false; + series3.Legend = "Legend1"; + series3.Name = "Placeholder"; + this.GainChartY.Series.Add(series1); + this.GainChartY.Series.Add(series2); + this.GainChartY.Series.Add(series3); + this.GainChartY.Size = new System.Drawing.Size(698, 308); + this.GainChartY.TabIndex = 39; + this.GainChartY.TabStop = false; + this.GainChartY.Text = "chart1"; + title1.DockedToChartArea = "ChartArea1"; + title1.IsDockedInsideChartArea = false; + title1.Name = "Title"; + title1.Text = "Gain"; + this.GainChartY.Titles.Add(title1); // - this.toggleButton.Location = new System.Drawing.Point(223, 384); - this.toggleButton.Name = "toggleButton"; - this.toggleButton.Size = new System.Drawing.Size(104, 24); - this.toggleButton.TabIndex = 24; - this.toggleButton.Text = "toggle"; - this.toggleButton.UseVisualStyleBackColor = true; + // VelocityChartY + // + chartArea2.AxisX.Title = "Input Speed (count/ms)"; + chartArea2.AxisY.Title = "Output Speed (counts/ms)"; + chartArea2.Name = "ChartArea1"; + this.VelocityChartY.ChartAreas.Add(chartArea2); + legend2.Name = "Legend1"; + this.VelocityChartY.Legends.Add(legend2); + this.VelocityChartY.Location = new System.Drawing.Point(699, 332); + this.VelocityChartY.Name = "VelocityChartY"; + series4.ChartArea = "ChartArea1"; + series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series4.Legend = "Legend1"; + series4.Name = "Output Velocity"; + series5.ChartArea = "ChartArea1"; + series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series5.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + series5.Legend = "Legend1"; + series5.Name = "Last Mouse Move"; + series6.ChartArea = "ChartArea1"; + series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series6.IsVisibleInLegend = false; + series6.Legend = "Legend1"; + series6.Name = "Placeholder"; + this.VelocityChartY.Series.Add(series4); + this.VelocityChartY.Series.Add(series5); + this.VelocityChartY.Series.Add(series6); + this.VelocityChartY.Size = new System.Drawing.Size(698, 308); + this.VelocityChartY.TabIndex = 38; + this.VelocityChartY.TabStop = false; + this.VelocityChartY.Text = "chart1"; + title2.DockedToChartArea = "ChartArea1"; + title2.IsDockedInsideChartArea = false; + title2.Name = "Title"; + title2.Text = "Velocity"; + this.VelocityChartY.Titles.Add(title2); + // + // AccelerationChartY + // + chartArea3.AxisX.Title = "Input Speed (counts/ms)"; + chartArea3.AxisY.Title = "Ratio of Output to Input)"; + chartArea3.Name = "ChartArea1"; + this.AccelerationChartY.ChartAreas.Add(chartArea3); + legend3.Name = "Legend1"; + this.AccelerationChartY.Legends.Add(legend3); + this.AccelerationChartY.Location = new System.Drawing.Point(699, -2); + this.AccelerationChartY.Name = "AccelerationChartY"; + series7.ChartArea = "ChartArea1"; + series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series7.Legend = "Legend1"; + series7.Name = "Accelerated Sensitivity"; + series8.ChartArea = "ChartArea1"; + series8.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series8.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + series8.Legend = "Legend1"; + series8.Name = "Last Mouse Move"; + series9.ChartArea = "ChartArea1"; + series9.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series9.IsVisibleInLegend = false; + series9.Legend = "Legend1"; + series9.Name = "Placeholder"; + this.AccelerationChartY.Series.Add(series7); + this.AccelerationChartY.Series.Add(series8); + this.AccelerationChartY.Series.Add(series9); + this.AccelerationChartY.Size = new System.Drawing.Size(698, 328); + this.AccelerationChartY.TabIndex = 37; + this.AccelerationChartY.TabStop = false; + this.AccelerationChartY.Text = "chart1"; + title3.DockedToChartArea = "ChartArea1"; + title3.IsDockedInsideChartArea = false; + title3.Name = "Title"; + title3.Text = "Sensitivity"; + this.AccelerationChartY.Titles.Add(title3); + // + // GainChart + // + chartArea4.AxisX.Title = "Input Speed (counts/ms)"; + chartArea4.AxisY.Title = "Slope of Velocity Chart"; + chartArea4.Name = "ChartArea1"; + this.GainChart.ChartAreas.Add(chartArea4); + legend4.Name = "Legend1"; + this.GainChart.Legends.Add(legend4); + this.GainChart.Location = new System.Drawing.Point(-5, 645); + this.GainChart.Name = "GainChart"; + series10.ChartArea = "ChartArea1"; + series10.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series10.Legend = "Legend1"; + series10.Name = "Velocity Gain"; + series11.ChartArea = "ChartArea1"; + series11.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series11.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + series11.Legend = "Legend1"; + series11.Name = "Last Mouse Move"; + series12.ChartArea = "ChartArea1"; + series12.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series12.Legend = "Legend1"; + series12.Name = "Y: Velocity Gain"; + series13.ChartArea = "ChartArea1"; + series13.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series13.IsVisibleInLegend = false; + series13.Legend = "Legend1"; + series13.Name = "Y: Last Mouse Move"; + this.GainChart.Series.Add(series10); + this.GainChart.Series.Add(series11); + this.GainChart.Series.Add(series12); + this.GainChart.Series.Add(series13); + this.GainChart.Size = new System.Drawing.Size(698, 308); + this.GainChart.TabIndex = 36; + this.GainChart.TabStop = false; + this.GainChart.Text = "chart1"; + title4.DockedToChartArea = "ChartArea1"; + title4.IsDockedInsideChartArea = false; + title4.Name = "Title"; + title4.Text = "Gain"; + this.GainChart.Titles.Add(title4); + // + // VelocityChart + // + chartArea5.AxisX.Title = "Input Speed (count/ms)"; + chartArea5.AxisY.Title = "Output Speed (counts/ms)"; + chartArea5.Name = "ChartArea1"; + this.VelocityChart.ChartAreas.Add(chartArea5); + legend5.Name = "Legend1"; + this.VelocityChart.Legends.Add(legend5); + this.VelocityChart.Location = new System.Drawing.Point(-5, 332); + this.VelocityChart.Name = "VelocityChart"; + series14.ChartArea = "ChartArea1"; + series14.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series14.Legend = "Legend1"; + series14.Name = "Output Velocity"; + series15.ChartArea = "ChartArea1"; + series15.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series15.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + series15.Legend = "Legend1"; + series15.Name = "Last Mouse Move"; + series16.ChartArea = "ChartArea1"; + series16.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series16.Legend = "Legend1"; + series16.Name = "Y: Output Velocity"; + series17.ChartArea = "ChartArea1"; + series17.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series17.IsVisibleInLegend = false; + series17.Legend = "Legend1"; + series17.Name = "Y: Last Mouse Move"; + this.VelocityChart.Series.Add(series14); + this.VelocityChart.Series.Add(series15); + this.VelocityChart.Series.Add(series16); + this.VelocityChart.Series.Add(series17); + this.VelocityChart.Size = new System.Drawing.Size(698, 308); + this.VelocityChart.TabIndex = 35; + this.VelocityChart.TabStop = false; + this.VelocityChart.Text = "chart1"; + title5.DockedToChartArea = "ChartArea1"; + title5.IsDockedInsideChartArea = false; + title5.Name = "Title"; + title5.Text = "Velocity"; + this.VelocityChart.Titles.Add(title5); + // + // AccelerationChart + // + chartArea6.AxisX.Title = "Input Speed (counts/ms)"; + chartArea6.AxisY.Title = "Ratio of Output to Input"; + chartArea6.Name = "ChartArea1"; + this.AccelerationChart.ChartAreas.Add(chartArea6); + legend6.Name = "Legend1"; + this.AccelerationChart.Legends.Add(legend6); + this.AccelerationChart.Location = new System.Drawing.Point(-5, -2); + this.AccelerationChart.Name = "AccelerationChart"; + series18.ChartArea = "ChartArea1"; + series18.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series18.Legend = "Legend1"; + series18.Name = "Accelerated Sensitivity"; + series19.ChartArea = "ChartArea1"; + series19.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series19.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + series19.Legend = "Legend1"; + series19.Name = "Last Mouse Move"; + series20.ChartArea = "ChartArea1"; + series20.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series20.Legend = "Legend1"; + series20.Name = "Y: Accelerated Sensitivity"; + series21.ChartArea = "ChartArea1"; + series21.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; + series21.IsVisibleInLegend = false; + series21.Legend = "Legend1"; + series21.Name = "Y - Last Mouse Move"; + this.AccelerationChart.Series.Add(series18); + this.AccelerationChart.Series.Add(series19); + this.AccelerationChart.Series.Add(series20); + this.AccelerationChart.Series.Add(series21); + this.AccelerationChart.Size = new System.Drawing.Size(698, 328); + this.AccelerationChart.TabIndex = 34; + this.AccelerationChart.TabStop = false; + this.AccelerationChart.Text = "Sensitivity"; + title6.DockedToChartArea = "ChartArea1"; + title6.IsDockedInsideChartArea = false; + title6.Name = "Title"; + title6.Text = "Sensitivity"; + this.AccelerationChart.Titles.Add(title6); // // RawAcceleration // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1884, 956); - this.Controls.Add(this.toggleButton); - this.Controls.Add(this.scaleLabelY); - this.Controls.Add(this.ScaleActiveYLabel); - this.Controls.Add(this.scaleBoxY); - this.Controls.Add(this.ScaleActiveXLabel); - this.Controls.Add(this.scaleLabelX); - this.Controls.Add(this.scaleBoxX); - this.Controls.Add(this.expLabelY); - this.Controls.Add(this.ExpActiveYLabel); - this.Controls.Add(this.expBoxY); - this.Controls.Add(this.ExpActiveXLabel); - this.Controls.Add(this.expLabelX); - this.Controls.Add(this.expBoxX); - this.Controls.Add(this.ActiveValueTitleY); - this.Controls.Add(this.AccelTypeActiveLabelY); - this.Controls.Add(this.OptionSetYTitle); - this.Controls.Add(this.OptionSetXTitle); - this.Controls.Add(this.constantThreeLabelY); - this.Controls.Add(this.limitLabelY); - this.Controls.Add(this.offsetLabelY); - this.Controls.Add(this.weightLabelY); - this.Controls.Add(this.capLabelY); - this.Controls.Add(this.constantOneLabelY); - this.Controls.Add(this.ByComponentXYLock); - this.Controls.Add(this.MidpointActiveYLabel); - this.Controls.Add(this.LimitActiveYLabel); - this.Controls.Add(this.OffsetActiveYLabel); - this.Controls.Add(this.AccelerationActiveLabelY); - this.Controls.Add(this.accelTypeDropY); - this.Controls.Add(this.midpointBoxY); - this.Controls.Add(this.limitBoxY); - this.Controls.Add(this.offsetBoxY); - this.Controls.Add(this.accelerationBoxY); - this.Controls.Add(this.MidpointActiveXLabel); - this.Controls.Add(this.LimitActiveXLabel); - this.Controls.Add(this.OffsetActiveXLabel); - this.Controls.Add(this.CapActiveYLabel); - this.Controls.Add(this.WeightActiveYLabel); - this.Controls.Add(this.WeightActiveXLabel); - this.Controls.Add(this.CapActiveXLabel); - this.Controls.Add(this.AccelerationActiveLabelX); - this.Controls.Add(this.AccelTypeActiveLabelX); - this.Controls.Add(this.RotationActiveLabel); - this.Controls.Add(this.SensitivityActiveYLabel); - this.Controls.Add(this.SensitivityActiveXLabel); - this.Controls.Add(this.ActiveValueTitle); - this.Controls.Add(this.MouseLabel); - this.Controls.Add(this.GainChartY); - this.Controls.Add(this.VelocityChartY); - this.Controls.Add(this.AccelerationChartY); - this.Controls.Add(this.GainChart); - this.Controls.Add(this.VelocityChart); - this.Controls.Add(this.LockXYLabel); - this.Controls.Add(this.sensXYLock); - this.Controls.Add(this.capBoxY); - this.Controls.Add(this.sensitivityBoxY); - this.Controls.Add(this.writeButton); - this.Controls.Add(this.offsetLabelX); - this.Controls.Add(this.offsetBoxX); - this.Controls.Add(this.constantThreeLabelX); - this.Controls.Add(this.midpointBoxX); - this.Controls.Add(this.limitLabelX); - this.Controls.Add(this.limitBoxX); - this.Controls.Add(this.weightBoxY); - this.Controls.Add(this.weightLabelX); - this.Controls.Add(this.weightBoxX); - this.Controls.Add(this.capLabelX); - this.Controls.Add(this.capBoxX); - this.Controls.Add(this.constantOneLabelX); - this.Controls.Add(this.accelerationBoxX); - this.Controls.Add(this.rotationLabel); - this.Controls.Add(this.rotationBox); - this.Controls.Add(this.sensitivityLabel); - this.Controls.Add(this.sensitivityBoxX); - this.Controls.Add(this.accelTypeDropX); - this.Controls.Add(this.AccelerationChart); - this.Controls.Add(this.menuStrip1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "RawAcceleration"; this.Text = "Raw Accel"; this.Load += new System.EventHandler(this.Form1_Load); this.Paint += new System.Windows.Forms.PaintEventHandler(this.RawAcceleration_Paint); - ((System.ComponentModel.ISupportInitialize)(this.AccelerationChart)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.VelocityChart)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.GainChart)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.AccelerationChartY)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.VelocityChartY)).EndInit(); + this.panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.GainChartY)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.VelocityChartY)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.AccelerationChartY)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.GainChart)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.VelocityChart)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.AccelerationChart)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion - - private System.Windows.Forms.DataVisualization.Charting.Chart AccelerationChart; - private System.Windows.Forms.ComboBox accelTypeDropX; - private System.Windows.Forms.TextBox sensitivityBoxX; - private System.Windows.Forms.Label sensitivityLabel; - private System.Windows.Forms.TextBox rotationBox; - private System.Windows.Forms.Label rotationLabel; - private System.Windows.Forms.TextBox accelerationBoxX; - private System.Windows.Forms.Label constantOneLabelX; - private System.Windows.Forms.TextBox capBoxX; - private System.Windows.Forms.Label capLabelX; - private System.Windows.Forms.TextBox weightBoxX; - private System.Windows.Forms.Label weightLabelX; - private System.Windows.Forms.TextBox weightBoxY; - private System.Windows.Forms.TextBox limitBoxX; - private System.Windows.Forms.Label limitLabelX; - private System.Windows.Forms.TextBox midpointBoxX; - private System.Windows.Forms.Label constantThreeLabelX; - private System.Windows.Forms.TextBox offsetBoxX; - private System.Windows.Forms.Label offsetLabelX; - private System.Windows.Forms.TextBox sensitivityBoxY; - private System.Windows.Forms.TextBox capBoxY; - private System.Windows.Forms.CheckBox sensXYLock; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.CheckBox toggleButton; + private System.Windows.Forms.Label scaleLabelY; + private System.Windows.Forms.Label ScaleActiveYLabel; + private System.Windows.Forms.TextBox scaleBoxY; + private System.Windows.Forms.Label ScaleActiveXLabel; + private System.Windows.Forms.Label scaleLabelX; + private System.Windows.Forms.TextBox scaleBoxX; + private System.Windows.Forms.Label expLabelY; + private System.Windows.Forms.Label ExpActiveYLabel; + private System.Windows.Forms.TextBox expBoxY; + private System.Windows.Forms.Label ExpActiveXLabel; + private System.Windows.Forms.Label expLabelX; + private System.Windows.Forms.TextBox expBoxX; + private System.Windows.Forms.Label ActiveValueTitleY; + private System.Windows.Forms.Label AccelTypeActiveLabelY; + private System.Windows.Forms.Label OptionSetYTitle; + private System.Windows.Forms.Label OptionSetXTitle; + private System.Windows.Forms.Label constantThreeLabelY; + private System.Windows.Forms.Label limitLabelY; + private System.Windows.Forms.Label offsetLabelY; + private System.Windows.Forms.Label weightLabelY; + private System.Windows.Forms.Label capLabelY; + private System.Windows.Forms.Label constantOneLabelY; + private System.Windows.Forms.CheckBox ByComponentXYLock; + private System.Windows.Forms.Label MidpointActiveYLabel; + private System.Windows.Forms.Label LimitActiveYLabel; + private System.Windows.Forms.Label OffsetActiveYLabel; + private System.Windows.Forms.Label AccelerationActiveLabelY; + private System.Windows.Forms.ComboBox accelTypeDropY; + private System.Windows.Forms.TextBox midpointBoxY; + private System.Windows.Forms.TextBox limitBoxY; + private System.Windows.Forms.TextBox offsetBoxY; + private System.Windows.Forms.TextBox accelerationBoxY; + private System.Windows.Forms.Label MidpointActiveXLabel; + private System.Windows.Forms.Label LimitActiveXLabel; + private System.Windows.Forms.Label OffsetActiveXLabel; + private System.Windows.Forms.Label CapActiveYLabel; + private System.Windows.Forms.Label WeightActiveYLabel; + private System.Windows.Forms.Label WeightActiveXLabel; + private System.Windows.Forms.Label CapActiveXLabel; + private System.Windows.Forms.Label AccelerationActiveLabelX; + private System.Windows.Forms.Label AccelTypeActiveLabelX; + private System.Windows.Forms.Label RotationActiveLabel; + private System.Windows.Forms.Label SensitivityActiveYLabel; + private System.Windows.Forms.Label SensitivityActiveXLabel; + private System.Windows.Forms.Label ActiveValueTitle; + private System.Windows.Forms.Label MouseLabel; private System.Windows.Forms.Label LockXYLabel; - private System.Windows.Forms.DataVisualization.Charting.Chart VelocityChart; - private System.Windows.Forms.DataVisualization.Charting.Chart GainChart; + private System.Windows.Forms.CheckBox sensXYLock; + private System.Windows.Forms.TextBox capBoxY; + private System.Windows.Forms.TextBox sensitivityBoxY; + private System.Windows.Forms.Button writeButton; + private System.Windows.Forms.Label offsetLabelX; + private System.Windows.Forms.TextBox offsetBoxX; + private System.Windows.Forms.Label constantThreeLabelX; + private System.Windows.Forms.TextBox midpointBoxX; + private System.Windows.Forms.Label limitLabelX; + private System.Windows.Forms.TextBox limitBoxX; + private System.Windows.Forms.TextBox weightBoxY; + private System.Windows.Forms.Label weightLabelX; + private System.Windows.Forms.TextBox weightBoxX; + private System.Windows.Forms.Label capLabelX; + private System.Windows.Forms.TextBox capBoxX; + private System.Windows.Forms.Label constantOneLabelX; + private System.Windows.Forms.TextBox accelerationBoxX; + private System.Windows.Forms.Label rotationLabel; + private System.Windows.Forms.TextBox rotationBox; + private System.Windows.Forms.Label sensitivityLabel; + private System.Windows.Forms.TextBox sensitivityBoxX; + private System.Windows.Forms.ComboBox accelTypeDropX; private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.ToolStripMenuItem graphsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem showVelocityGainToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem advancedToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem capStyleToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem gainCapToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem legacyCapToolStripMenuItem; - private System.Windows.Forms.DataVisualization.Charting.Chart AccelerationChartY; - private System.Windows.Forms.DataVisualization.Charting.Chart VelocityChartY; - private System.Windows.Forms.DataVisualization.Charting.Chart GainChartY; - private System.Windows.Forms.Label MouseLabel; private System.Windows.Forms.ToolStripMenuItem scaleByDPIToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem dPIToolStripMenuItem; private System.Windows.Forms.ToolStripTextBox DPITextBox; private System.Windows.Forms.ToolStripMenuItem pollRateToolStripMenuItem; private System.Windows.Forms.ToolStripTextBox PollRateTextBox; private System.Windows.Forms.ToolStripMenuItem ScaleMenuItem; - private System.Windows.Forms.Label ActiveValueTitle; - private System.Windows.Forms.Label SensitivityActiveXLabel; - private System.Windows.Forms.Label SensitivityActiveYLabel; - private System.Windows.Forms.Label RotationActiveLabel; - private System.Windows.Forms.Label AccelTypeActiveLabelX; - private System.Windows.Forms.Label AccelerationActiveLabelX; - private System.Windows.Forms.Label CapActiveXLabel; - private System.Windows.Forms.Label WeightActiveXLabel; - private System.Windows.Forms.Label WeightActiveYLabel; - private System.Windows.Forms.Label CapActiveYLabel; - private System.Windows.Forms.Label OffsetActiveXLabel; - private System.Windows.Forms.Label LimitActiveXLabel; - private System.Windows.Forms.Label MidpointActiveXLabel; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; - private System.Windows.Forms.ToolStripMenuItem wholeVectorToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem byVectorComponentToolStripMenuItem; - private System.Windows.Forms.TextBox accelerationBoxY; - private System.Windows.Forms.TextBox offsetBoxY; - private System.Windows.Forms.TextBox limitBoxY; - private System.Windows.Forms.TextBox midpointBoxY; - private System.Windows.Forms.ComboBox accelTypeDropY; - private System.Windows.Forms.Label AccelerationActiveLabelY; - private System.Windows.Forms.Label OffsetActiveYLabel; - private System.Windows.Forms.Label LimitActiveYLabel; - private System.Windows.Forms.Label MidpointActiveYLabel; - private System.Windows.Forms.CheckBox ByComponentXYLock; - private System.Windows.Forms.Label constantOneLabelY; - private System.Windows.Forms.Label capLabelY; - private System.Windows.Forms.Label weightLabelY; - private System.Windows.Forms.Label offsetLabelY; - private System.Windows.Forms.Label limitLabelY; - private System.Windows.Forms.Label constantThreeLabelY; - private System.Windows.Forms.Label OptionSetXTitle; - private System.Windows.Forms.Label OptionSetYTitle; - private System.Windows.Forms.Label AccelTypeActiveLabelY; + private System.Windows.Forms.ToolStripMenuItem showVelocityGainToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem showLastMouseMoveToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem advancedToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem capStyleToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem gainCapToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem legacyCapToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem offsetStyleToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem gainOffsetToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem legacyOffsetToolStripMenuItem; - private System.Windows.Forms.Label ActiveValueTitleY; - private System.Windows.Forms.ToolStripMenuItem showLastMouseMoveToolStripMenuItem; - private System.Windows.Forms.Label expLabelY; - private System.Windows.Forms.Label ExpActiveYLabel; - private System.Windows.Forms.TextBox expBoxY; - private System.Windows.Forms.Label ExpActiveXLabel; - private System.Windows.Forms.Label expLabelX; - private System.Windows.Forms.TextBox expBoxX; - private System.Windows.Forms.Label scaleLabelY; - private System.Windows.Forms.Label ScaleActiveYLabel; - private System.Windows.Forms.TextBox scaleBoxY; - private System.Windows.Forms.Label ScaleActiveXLabel; - private System.Windows.Forms.Label scaleLabelX; - private System.Windows.Forms.TextBox scaleBoxX; - private System.Windows.Forms.CheckBox toggleButton; - private System.Windows.Forms.Button writeButton; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem wholeVectorToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem byVectorComponentToolStripMenuItem; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.DataVisualization.Charting.Chart GainChartY; + private System.Windows.Forms.DataVisualization.Charting.Chart VelocityChartY; + private System.Windows.Forms.DataVisualization.Charting.Chart AccelerationChartY; + private System.Windows.Forms.DataVisualization.Charting.Chart GainChart; + private System.Windows.Forms.DataVisualization.Charting.Chart VelocityChart; + private System.Windows.Forms.DataVisualization.Charting.Chart AccelerationChart; } } diff --git a/grapher/Form1.cs b/grapher/Form1.cs index 91cc4e2a..a0d2faec 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -155,11 +155,35 @@ private void Form1_Load(object sender, EventArgs e) } + public void ResetAutoScroll() + { + panel2.AutoScrollPosition = Constants.Origin; + } + + public void DoResize() + { + ResetAutoScroll(); + + var wa = Screen.PrimaryScreen.WorkingArea; + var pref2 = panel2.GetPreferredSize(Constants.MaxSize); + + Size = new Size + { + Width = Math.Min(wa.Width - Location.X, panel1.Size.Width + pref2.Width), + Height = Math.Min(wa.Height - Location.Y, pref2.Height + 48) + }; + } + private void RawAcceleration_Paint(object sender, PaintEventArgs e) { //AccelGUI.AccelCharts.DrawLastMovement(); } #endregion Method + + private void panel1_Paint(object sender, PaintEventArgs e) + { + + } } } diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index c561b232..50207b22 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -35,6 +35,7 @@ public AccelGUI( Settings = settings; Settings.Startup(); RefreshOnRead(Settings.RawAccelSettings.AccelerationSettings); + AccelForm.DoResize(); DefaultButtonFont = WriteButton.Font; SmallButtonFont = new Font(WriteButton.Font.Name, WriteButton.Font.Size * 0.666f); @@ -151,6 +152,7 @@ public void UpdateGraph(DriverSettings args) public void UpdateShownActiveValues(DriverSettings args) { + AccelForm.ResetAutoScroll(); AccelCharts.ShowActive(args); ApplyOptions.SetActiveValues(args); } diff --git a/grapher/Models/Charts/AccelCharts.cs b/grapher/Models/Charts/AccelCharts.cs index 9087b308..6247811e 100644 --- a/grapher/Models/Charts/AccelCharts.cs +++ b/grapher/Models/Charts/AccelCharts.cs @@ -13,7 +13,7 @@ public class AccelCharts #region Constructors public AccelCharts( - Form form, + RawAcceleration form, ChartXY sensitivityChart, ChartXY velocityChart, ChartXY gainChart, @@ -34,10 +34,6 @@ public AccelCharts( EnableLastValue = enableLastMouseMove; WriteButton = writeButton; - - Rectangle screenRectangle = ContainingForm.RectangleToScreen(ContainingForm.ClientRectangle); - FormBorderHeight = screenRectangle.Top - ContainingForm.Top; - EnableVelocityAndGain.Click += new System.EventHandler(OnEnableClick); EnableVelocityAndGain.CheckedChanged += new System.EventHandler(OnEnableVelocityGainCheckStateChange); @@ -52,7 +48,7 @@ public AccelCharts( #region Properties - public Form ContainingForm { get; } + public RawAcceleration ContainingForm { get; } public ToolStripMenuItem EnableVelocityAndGain { get; } @@ -125,23 +121,9 @@ public void ShowActive(DriverSettings driverSettings) { ChartState = ChartStateManager.DetermineState(driverSettings); ChartState.Activate(); - UpdateFormWidth(); Bind(); } - public void SetWidened() - { - ChartState.SetWidened(); - UpdateFormWidth(); - //AlignWriteButton(); - } - - public void SetNarrowed() - { - ChartState.SetNarrowed(); - UpdateFormWidth(); - //AlignWriteButton(); - } public void Redraw() { @@ -176,8 +158,6 @@ private static void SetupCharts( velocityChart.SetTop(sensitivityChart.Height + Constants.ChartSeparationVertical); gainChart.SetHeight(sensitivityChart.Height); gainChart.SetTop(velocityChart.Top + velocityChart.Height + Constants.ChartSeparationVertical); - - sensitivityChart.Show(); } private void OnEnableClick(object sender, EventArgs e) @@ -187,6 +167,7 @@ private void OnEnableClick(object sender, EventArgs e) private void OnEnableVelocityGainCheckStateChange(object sender, EventArgs e) { + ContainingForm.ResetAutoScroll(); if (EnableVelocityAndGain.Checked) { ShowVelocityAndGain(); @@ -207,17 +188,12 @@ private void OnEnableLastMouseMoveCheckStateChange(object sender, EventArgs e) private void ShowVelocityAndGain() { - ChartState.ShowVelocityAndGain(ContainingForm, FormBorderHeight); + ChartState.ShowVelocityAndGain(); } private void HideVelocityAndGain() { - ChartState.HideVelocityAndGain(ContainingForm, FormBorderHeight); - } - - private void UpdateFormWidth() - { - ContainingForm.Width = ChartState.SensitivityChart.Left + ChartState.SensitivityChart.Width; + ChartState.HideVelocityAndGain(); } private void AlignWriteButton() diff --git a/grapher/Models/Charts/ChartState/ChartState.cs b/grapher/Models/Charts/ChartState/ChartState.cs index 1898e129..270e2125 100644 --- a/grapher/Models/Charts/ChartState/ChartState.cs +++ b/grapher/Models/Charts/ChartState/ChartState.cs @@ -68,20 +68,6 @@ public void DrawLastMovement() GainChart.DrawLastMovementValue(TwoDotsPerGraph); } - public void SetWidened() - { - SensitivityChart.SetWidened(); - VelocityChart.SetWidened(); - GainChart.SetWidened(); - } - - public void SetNarrowed() - { - SensitivityChart.SetNarrowed(); - VelocityChart.SetNarrowed(); - GainChart.SetNarrowed(); - } - public void ClearLastValue() { SensitivityChart.ClearLastValue(); @@ -89,23 +75,16 @@ public void ClearLastValue() GainChart.ClearLastValue(); } - public void ShowVelocityAndGain(Form form, int borderHeight) + public void ShowVelocityAndGain() { VelocityChart.Show(); GainChart.Show(); - form.Height = SensitivityChart.Height + - Constants.ChartSeparationVertical + - VelocityChart.Height + - Constants.ChartSeparationVertical + - GainChart.Height + - borderHeight; } - public void HideVelocityAndGain(Form form, int borderHeight) + public void HideVelocityAndGain() { VelocityChart.Hide(); GainChart.Hide(); - form.Height = SensitivityChart.Height + borderHeight; } public void SetLogarithmic(bool x, bool y) diff --git a/grapher/Models/Charts/ChartXY.cs b/grapher/Models/Charts/ChartXY.cs index 27b63b57..98ba059b 100644 --- a/grapher/Models/Charts/ChartXY.cs +++ b/grapher/Models/Charts/ChartXY.cs @@ -24,9 +24,7 @@ public ChartXY(Chart chartX, Chart chartY, string title) Combined = false; SetCombined(); - - Widened = false; - SetWidened(); + Visible = true; } #endregion Constructors @@ -72,11 +70,9 @@ public int Left { } } - public bool Combined { get; private set; } - - public bool Widened { get; private set; } + public bool Combined { get; set; } - public bool Visible { get; private set; } + public bool Visible { get; set; } public string Title { get; } @@ -273,36 +269,10 @@ public void SetSeparate() } } - public void SetWidened() - { - if (!Widened) - { - ChartX.Width = Constants.WideChartWidth; - ChartY.Width = Constants.WideChartWidth; - - ChartX.Left = Constants.WideChartLeft; - ChartY.Left = ChartX.Left + ChartX.Width + Constants.ChartSeparationHorizontal; - - Widened = true; - } - } - - public void SetNarrowed() - { - if (Widened) - { - ChartX.Width = Constants.NarrowChartWidth; - ChartY.Width = Constants.NarrowChartWidth; - - ChartX.Left = Constants.NarrowChartLeft; - ChartY.Left = ChartX.Left + ChartX.Width + Constants.ChartSeparationHorizontal; - - Widened = false; - } - } public void Hide() { + if (Visible) { ChartX.Hide(); diff --git a/grapher/Models/Options/ApplyOptions.cs b/grapher/Models/Options/ApplyOptions.cs index 71e580dc..b8cc9bfe 100644 --- a/grapher/Models/Options/ApplyOptions.cs +++ b/grapher/Models/Options/ApplyOptions.cs @@ -175,16 +175,14 @@ public void ShowWholeSet() { OptionSetX.SetRegularMode(); OptionSetY.Hide(); - AccelCharts.SetWidened(); - SetActiveTitlesWhole(); + //SetActiveTitlesWhole(); } public void ShowByComponentAsOneSet() { OptionSetX.SetTitleMode("X = Y"); OptionSetY.Hide(); - AccelCharts.SetWidened(); - SetActiveTitlesByComponents(); + //SetActiveTitlesByComponents(); } public void ShowByComponentAsTwoSets() @@ -192,7 +190,6 @@ public void ShowByComponentAsTwoSets() OptionSetX.SetTitleMode("X"); OptionSetY.SetTitleMode("Y"); OptionSetY.Show(); - AccelCharts.SetNarrowed(); } public void ShowByComponentSet() From eb32e441cd3fd5f53312df1af81400647833b213 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 8 Oct 2020 18:44:07 -0400 Subject: [PATCH 06/10] rename sensitivity field to 'sens multiplier' --- grapher/Form1.Designer.cs | 4 ++-- grapher/Models/AccelGUIFactory.cs | 2 +- wrapper/wrapper.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index 8c3af0b6..c6221b08 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -846,9 +846,9 @@ private void InitializeComponent() this.sensitivityLabel.AutoSize = true; this.sensitivityLabel.Location = new System.Drawing.Point(25, 52); this.sensitivityLabel.Name = "sensitivityLabel"; - this.sensitivityLabel.Size = new System.Drawing.Size(54, 13); + this.sensitivityLabel.Size = new System.Drawing.Size(75, 13); this.sensitivityLabel.TabIndex = 85; - this.sensitivityLabel.Text = "Sensitivity"; + this.sensitivityLabel.Text = "Sens Multiplier"; // // sensitivityBoxX // diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index 579e664c..51bbc2b9 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -126,7 +126,7 @@ public static AccelGUI Construct( new ActiveValueLabelXY( new ActiveValueLabel(sensitivityActiveXLabel, activeValueTitleX), new ActiveValueLabel(sensitivityActiveYLabel, activeValueTitleX)), - "Sensitivity"); + "Sens Multiplier"); var rotation = new Option( rotationBox, diff --git a/wrapper/wrapper.cpp b/wrapper/wrapper.cpp index d1f0e092..a921801f 100644 --- a/wrapper/wrapper.cpp +++ b/wrapper/wrapper.cpp @@ -63,7 +63,7 @@ public ref struct DriverSettings [JsonProperty("Accel parameters")] Vec2 args; - [JsonProperty("Sensitivity")] + [JsonProperty("Sensitivity multipliers")] Vec2 sensitivity; [JsonProperty(Required = Required::Default)] From 0039d6e84d4e05e842542ad021a9c21e619c69c2 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Thu, 8 Oct 2020 19:44:40 -0700 Subject: [PATCH 07/10] Follow full C# convention --- grapher/Models/AccelGUI.cs | 2 +- grapher/Models/Serialized/GUISettings.cs | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 50207b22..d93017a2 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -98,7 +98,7 @@ public AccelGUI( private void SaveGUISettingsOnClose(Object sender, FormClosingEventArgs e) { var guiSettings = Settings.MakeGUISettingsFromFields(); - if (!Settings.RawAccelSettings.GUISettings.ValueEquals(guiSettings)) + if (!Settings.RawAccelSettings.GUISettings.Equals(guiSettings)) { Settings.RawAccelSettings.GUISettings = guiSettings; Settings.RawAccelSettings.Save(); diff --git a/grapher/Models/Serialized/GUISettings.cs b/grapher/Models/Serialized/GUISettings.cs index f9e57551..c8f87aed 100644 --- a/grapher/Models/Serialized/GUISettings.cs +++ b/grapher/Models/Serialized/GUISettings.cs @@ -31,7 +31,19 @@ public GUISettings() {} #region Methods - public bool ValueEquals(GUISettings other) + public override bool Equals(object obj) + { + var other = obj as GUISettings; + + if (other == null) + { + return false; + } + + return Equals(other); + } + + public bool Equals(GUISettings other) { return DPI == other.DPI && PollRate == other.PollRate && @@ -39,6 +51,14 @@ public bool ValueEquals(GUISettings other) ShowVelocityAndGain == other.ShowVelocityAndGain; } + public override int GetHashCode() + { + return DPI.GetHashCode() ^ + PollRate.GetHashCode() ^ + ShowLastMouseMove.GetHashCode() ^ + ShowVelocityAndGain.GetHashCode(); + } + #endregion Methods } } From a44294e7e689e43417323d6b1684f7462d113cb1 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 8 Oct 2020 22:53:31 -0400 Subject: [PATCH 08/10] improve comments, variable names --- grapher/Constants/Constants.cs | 4 +- grapher/Form1.Designer.cs | 212 +++++++++--------- grapher/Form1.cs | 12 +- grapher/Models/Serialized/RawAccelSettings.cs | 8 +- 4 files changed, 118 insertions(+), 118 deletions(-) diff --git a/grapher/Constants/Constants.cs b/grapher/Constants/Constants.cs index 5a05863a..c207b6de 100644 --- a/grapher/Constants/Constants.cs +++ b/grapher/Constants/Constants.cs @@ -84,10 +84,10 @@ public static class Constants /// Default text to be displayed on write button. public const string WriteButtonDefaultText = "Apply"; - /// Default text to be displayed on write button. + /// Default text to be displayed on toggle button. public const string ToggleButtonDefaultText = "Toggle"; - /// Default text to be displayed on write button. + /// Default text to be displayed on button delay. public const string ButtonDelayText = "Delay"; /// Title of sensitivity chart. diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index c6221b08..a6ae7543 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -70,7 +70,7 @@ private void InitializeComponent() System.Windows.Forms.DataVisualization.Charting.Series series21 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Title title6 = new System.Windows.Forms.DataVisualization.Charting.Title(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RawAcceleration)); - this.panel1 = new System.Windows.Forms.Panel(); + this.optionsPanel = new System.Windows.Forms.Panel(); this.toggleButton = new System.Windows.Forms.CheckBox(); this.scaleLabelY = new System.Windows.Forms.Label(); this.ScaleActiveYLabel = new System.Windows.Forms.Label(); @@ -161,16 +161,16 @@ private void InitializeComponent() this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.wholeVectorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.byVectorComponentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.panel2 = new System.Windows.Forms.Panel(); + this.chartsPanel = new System.Windows.Forms.Panel(); this.GainChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.VelocityChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.AccelerationChartY = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.GainChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.VelocityChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.AccelerationChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.panel1.SuspendLayout(); + this.optionsPanel.SuspendLayout(); this.menuStrip1.SuspendLayout(); - this.panel2.SuspendLayout(); + this.chartsPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.GainChartY)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.VelocityChartY)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.AccelerationChartY)).BeginInit(); @@ -179,87 +179,87 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.AccelerationChart)).BeginInit(); this.SuspendLayout(); // - // panel1 - // - this.panel1.AutoSize = true; - this.panel1.Controls.Add(this.toggleButton); - this.panel1.Controls.Add(this.scaleLabelY); - this.panel1.Controls.Add(this.ScaleActiveYLabel); - this.panel1.Controls.Add(this.scaleBoxY); - this.panel1.Controls.Add(this.ScaleActiveXLabel); - this.panel1.Controls.Add(this.scaleLabelX); - this.panel1.Controls.Add(this.scaleBoxX); - this.panel1.Controls.Add(this.expLabelY); - this.panel1.Controls.Add(this.ExpActiveYLabel); - this.panel1.Controls.Add(this.expBoxY); - this.panel1.Controls.Add(this.ExpActiveXLabel); - this.panel1.Controls.Add(this.expLabelX); - this.panel1.Controls.Add(this.expBoxX); - this.panel1.Controls.Add(this.ActiveValueTitleY); - this.panel1.Controls.Add(this.AccelTypeActiveLabelY); - this.panel1.Controls.Add(this.OptionSetYTitle); - this.panel1.Controls.Add(this.OptionSetXTitle); - this.panel1.Controls.Add(this.constantThreeLabelY); - this.panel1.Controls.Add(this.limitLabelY); - this.panel1.Controls.Add(this.offsetLabelY); - this.panel1.Controls.Add(this.weightLabelY); - this.panel1.Controls.Add(this.capLabelY); - this.panel1.Controls.Add(this.constantOneLabelY); - this.panel1.Controls.Add(this.ByComponentXYLock); - this.panel1.Controls.Add(this.MidpointActiveYLabel); - this.panel1.Controls.Add(this.LimitActiveYLabel); - this.panel1.Controls.Add(this.OffsetActiveYLabel); - this.panel1.Controls.Add(this.AccelerationActiveLabelY); - this.panel1.Controls.Add(this.accelTypeDropY); - this.panel1.Controls.Add(this.midpointBoxY); - this.panel1.Controls.Add(this.limitBoxY); - this.panel1.Controls.Add(this.offsetBoxY); - this.panel1.Controls.Add(this.accelerationBoxY); - this.panel1.Controls.Add(this.MidpointActiveXLabel); - this.panel1.Controls.Add(this.LimitActiveXLabel); - this.panel1.Controls.Add(this.OffsetActiveXLabel); - this.panel1.Controls.Add(this.CapActiveYLabel); - this.panel1.Controls.Add(this.WeightActiveYLabel); - this.panel1.Controls.Add(this.WeightActiveXLabel); - this.panel1.Controls.Add(this.CapActiveXLabel); - this.panel1.Controls.Add(this.AccelerationActiveLabelX); - this.panel1.Controls.Add(this.AccelTypeActiveLabelX); - this.panel1.Controls.Add(this.RotationActiveLabel); - this.panel1.Controls.Add(this.SensitivityActiveYLabel); - this.panel1.Controls.Add(this.SensitivityActiveXLabel); - this.panel1.Controls.Add(this.ActiveValueTitle); - this.panel1.Controls.Add(this.MouseLabel); - this.panel1.Controls.Add(this.LockXYLabel); - this.panel1.Controls.Add(this.sensXYLock); - this.panel1.Controls.Add(this.capBoxY); - this.panel1.Controls.Add(this.sensitivityBoxY); - this.panel1.Controls.Add(this.writeButton); - this.panel1.Controls.Add(this.offsetLabelX); - this.panel1.Controls.Add(this.offsetBoxX); - this.panel1.Controls.Add(this.constantThreeLabelX); - this.panel1.Controls.Add(this.midpointBoxX); - this.panel1.Controls.Add(this.limitLabelX); - this.panel1.Controls.Add(this.limitBoxX); - this.panel1.Controls.Add(this.weightBoxY); - this.panel1.Controls.Add(this.weightLabelX); - this.panel1.Controls.Add(this.weightBoxX); - this.panel1.Controls.Add(this.capLabelX); - this.panel1.Controls.Add(this.capBoxX); - this.panel1.Controls.Add(this.constantOneLabelX); - this.panel1.Controls.Add(this.accelerationBoxX); - this.panel1.Controls.Add(this.rotationLabel); - this.panel1.Controls.Add(this.rotationBox); - this.panel1.Controls.Add(this.sensitivityLabel); - this.panel1.Controls.Add(this.sensitivityBoxX); - this.panel1.Controls.Add(this.accelTypeDropX); - this.panel1.Controls.Add(this.menuStrip1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Left; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.MinimumSize = new System.Drawing.Size(2, 333); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(483, 956); - this.panel1.TabIndex = 34; - this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // optionsPanel + // + this.optionsPanel.AutoSize = true; + this.optionsPanel.Controls.Add(this.toggleButton); + this.optionsPanel.Controls.Add(this.scaleLabelY); + this.optionsPanel.Controls.Add(this.ScaleActiveYLabel); + this.optionsPanel.Controls.Add(this.scaleBoxY); + this.optionsPanel.Controls.Add(this.ScaleActiveXLabel); + this.optionsPanel.Controls.Add(this.scaleLabelX); + this.optionsPanel.Controls.Add(this.scaleBoxX); + this.optionsPanel.Controls.Add(this.expLabelY); + this.optionsPanel.Controls.Add(this.ExpActiveYLabel); + this.optionsPanel.Controls.Add(this.expBoxY); + this.optionsPanel.Controls.Add(this.ExpActiveXLabel); + this.optionsPanel.Controls.Add(this.expLabelX); + this.optionsPanel.Controls.Add(this.expBoxX); + this.optionsPanel.Controls.Add(this.ActiveValueTitleY); + this.optionsPanel.Controls.Add(this.AccelTypeActiveLabelY); + this.optionsPanel.Controls.Add(this.OptionSetYTitle); + this.optionsPanel.Controls.Add(this.OptionSetXTitle); + this.optionsPanel.Controls.Add(this.constantThreeLabelY); + this.optionsPanel.Controls.Add(this.limitLabelY); + this.optionsPanel.Controls.Add(this.offsetLabelY); + this.optionsPanel.Controls.Add(this.weightLabelY); + this.optionsPanel.Controls.Add(this.capLabelY); + this.optionsPanel.Controls.Add(this.constantOneLabelY); + this.optionsPanel.Controls.Add(this.ByComponentXYLock); + this.optionsPanel.Controls.Add(this.MidpointActiveYLabel); + this.optionsPanel.Controls.Add(this.LimitActiveYLabel); + this.optionsPanel.Controls.Add(this.OffsetActiveYLabel); + this.optionsPanel.Controls.Add(this.AccelerationActiveLabelY); + this.optionsPanel.Controls.Add(this.accelTypeDropY); + this.optionsPanel.Controls.Add(this.midpointBoxY); + this.optionsPanel.Controls.Add(this.limitBoxY); + this.optionsPanel.Controls.Add(this.offsetBoxY); + this.optionsPanel.Controls.Add(this.accelerationBoxY); + this.optionsPanel.Controls.Add(this.MidpointActiveXLabel); + this.optionsPanel.Controls.Add(this.LimitActiveXLabel); + this.optionsPanel.Controls.Add(this.OffsetActiveXLabel); + this.optionsPanel.Controls.Add(this.CapActiveYLabel); + this.optionsPanel.Controls.Add(this.WeightActiveYLabel); + this.optionsPanel.Controls.Add(this.WeightActiveXLabel); + this.optionsPanel.Controls.Add(this.CapActiveXLabel); + this.optionsPanel.Controls.Add(this.AccelerationActiveLabelX); + this.optionsPanel.Controls.Add(this.AccelTypeActiveLabelX); + this.optionsPanel.Controls.Add(this.RotationActiveLabel); + this.optionsPanel.Controls.Add(this.SensitivityActiveYLabel); + this.optionsPanel.Controls.Add(this.SensitivityActiveXLabel); + this.optionsPanel.Controls.Add(this.ActiveValueTitle); + this.optionsPanel.Controls.Add(this.MouseLabel); + this.optionsPanel.Controls.Add(this.LockXYLabel); + this.optionsPanel.Controls.Add(this.sensXYLock); + this.optionsPanel.Controls.Add(this.capBoxY); + this.optionsPanel.Controls.Add(this.sensitivityBoxY); + this.optionsPanel.Controls.Add(this.writeButton); + this.optionsPanel.Controls.Add(this.offsetLabelX); + this.optionsPanel.Controls.Add(this.offsetBoxX); + this.optionsPanel.Controls.Add(this.constantThreeLabelX); + this.optionsPanel.Controls.Add(this.midpointBoxX); + this.optionsPanel.Controls.Add(this.limitLabelX); + this.optionsPanel.Controls.Add(this.limitBoxX); + this.optionsPanel.Controls.Add(this.weightBoxY); + this.optionsPanel.Controls.Add(this.weightLabelX); + this.optionsPanel.Controls.Add(this.weightBoxX); + this.optionsPanel.Controls.Add(this.capLabelX); + this.optionsPanel.Controls.Add(this.capBoxX); + this.optionsPanel.Controls.Add(this.constantOneLabelX); + this.optionsPanel.Controls.Add(this.accelerationBoxX); + this.optionsPanel.Controls.Add(this.rotationLabel); + this.optionsPanel.Controls.Add(this.rotationBox); + this.optionsPanel.Controls.Add(this.sensitivityLabel); + this.optionsPanel.Controls.Add(this.sensitivityBoxX); + this.optionsPanel.Controls.Add(this.accelTypeDropX); + this.optionsPanel.Controls.Add(this.menuStrip1); + this.optionsPanel.Dock = System.Windows.Forms.DockStyle.Left; + this.optionsPanel.Location = new System.Drawing.Point(0, 0); + this.optionsPanel.MinimumSize = new System.Drawing.Size(2, 333); + this.optionsPanel.Name = "optionsPanel"; + this.optionsPanel.Size = new System.Drawing.Size(483, 956); + this.optionsPanel.TabIndex = 34; + this.optionsPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.optionsPanel_Paint); // // toggleButton // @@ -1027,20 +1027,20 @@ private void InitializeComponent() this.byVectorComponentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.byVectorComponentToolStripMenuItem.Text = "By Component"; // - // panel2 - // - this.panel2.AutoScroll = true; - this.panel2.Controls.Add(this.GainChartY); - this.panel2.Controls.Add(this.VelocityChartY); - this.panel2.Controls.Add(this.AccelerationChartY); - this.panel2.Controls.Add(this.GainChart); - this.panel2.Controls.Add(this.VelocityChart); - this.panel2.Controls.Add(this.AccelerationChart); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(483, 0); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(1401, 956); - this.panel2.TabIndex = 35; + // chartsPanel + // + this.chartsPanel.AutoScroll = true; + this.chartsPanel.Controls.Add(this.GainChartY); + this.chartsPanel.Controls.Add(this.VelocityChartY); + this.chartsPanel.Controls.Add(this.AccelerationChartY); + this.chartsPanel.Controls.Add(this.GainChart); + this.chartsPanel.Controls.Add(this.VelocityChart); + this.chartsPanel.Controls.Add(this.AccelerationChart); + this.chartsPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.chartsPanel.Location = new System.Drawing.Point(483, 0); + this.chartsPanel.Name = "chartsPanel"; + this.chartsPanel.Size = new System.Drawing.Size(1401, 956); + this.chartsPanel.TabIndex = 35; // // GainChartY // @@ -1284,18 +1284,18 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1884, 956); - this.Controls.Add(this.panel2); - this.Controls.Add(this.panel1); + this.Controls.Add(this.chartsPanel); + this.Controls.Add(this.optionsPanel); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "RawAcceleration"; this.Text = "Raw Accel"; this.Load += new System.EventHandler(this.Form1_Load); this.Paint += new System.Windows.Forms.PaintEventHandler(this.RawAcceleration_Paint); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); + this.optionsPanel.ResumeLayout(false); + this.optionsPanel.PerformLayout(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); - this.panel2.ResumeLayout(false); + this.chartsPanel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.GainChartY)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.VelocityChartY)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.AccelerationChartY)).EndInit(); @@ -1308,7 +1308,7 @@ private void InitializeComponent() } #endregion - private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel optionsPanel; private System.Windows.Forms.CheckBox toggleButton; private System.Windows.Forms.Label scaleLabelY; private System.Windows.Forms.Label ScaleActiveYLabel; @@ -1399,7 +1399,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem wholeVectorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem byVectorComponentToolStripMenuItem; - private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel chartsPanel; private System.Windows.Forms.DataVisualization.Charting.Chart GainChartY; private System.Windows.Forms.DataVisualization.Charting.Chart VelocityChartY; private System.Windows.Forms.DataVisualization.Charting.Chart AccelerationChartY; diff --git a/grapher/Form1.cs b/grapher/Form1.cs index a0d2faec..446618bf 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -157,20 +157,20 @@ private void Form1_Load(object sender, EventArgs e) public void ResetAutoScroll() { - panel2.AutoScrollPosition = Constants.Origin; + chartsPanel.AutoScrollPosition = Constants.Origin; } public void DoResize() { ResetAutoScroll(); - var wa = Screen.PrimaryScreen.WorkingArea; - var pref2 = panel2.GetPreferredSize(Constants.MaxSize); + var workingArea = Screen.PrimaryScreen.WorkingArea; + var chartsPreferredSize = chartsPanel.GetPreferredSize(Constants.MaxSize); Size = new Size { - Width = Math.Min(wa.Width - Location.X, panel1.Size.Width + pref2.Width), - Height = Math.Min(wa.Height - Location.Y, pref2.Height + 48) + Width = Math.Min(workingArea.Width - Location.X, optionsPanel.Size.Width + chartsPreferredSize.Width), + Height = Math.Min(workingArea.Height - Location.Y, chartsPreferredSize.Height + 48) }; } @@ -181,7 +181,7 @@ private void RawAcceleration_Paint(object sender, PaintEventArgs e) #endregion Method - private void panel1_Paint(object sender, PaintEventArgs e) + private void optionsPanel_Paint(object sender, PaintEventArgs e) { } diff --git a/grapher/Models/Serialized/RawAccelSettings.cs b/grapher/Models/Serialized/RawAccelSettings.cs index e0362ff7..818bfb61 100644 --- a/grapher/Models/Serialized/RawAccelSettings.cs +++ b/grapher/Models/Serialized/RawAccelSettings.cs @@ -55,16 +55,16 @@ public static RawAccelSettings Load(string file, Func DefaultGUISet { RawAccelSettings settings = null; - JObject jo = JObject.Parse(File.ReadAllText(file)); - if (jo.ContainsKey(DriverSettings.Key)) + JObject settingsJObject = JObject.Parse(File.ReadAllText(file)); + if (settingsJObject.ContainsKey(DriverSettings.Key)) { - settings = jo.ToObject(JsonSerializer.Create(SerializerSettings)); + settings = settingsJObject.ToObject(JsonSerializer.Create(SerializerSettings)); } else { settings = new RawAccelSettings { - AccelerationSettings = jo.ToObject(), + AccelerationSettings = settingsJObject.ToObject(), GUISettings = DefaultGUISettingsSupplier() }; } From 3b4796723709ae0cce9518ec0f682b737c6f7447 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 8 Oct 2020 23:04:00 -0400 Subject: [PATCH 09/10] disable write button when settings are toggled off --- grapher/Models/AccelGUI.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index d93017a2..f75d2840 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -169,8 +169,7 @@ private Timer SetupChartTimer() private void SetupButtons() { WriteButton.Top = AccelCharts.Top + AccelCharts.TopChartHeight - Constants.ButtonVerticalOffset; - SetWriteButtonDefault(); - + ToggleButton.Appearance = Appearance.Button; ToggleButton.FlatStyle = FlatStyle.System; ToggleButton.TextAlign = ContentAlignment.MiddleCenter; @@ -179,6 +178,7 @@ private void SetupButtons() RefreshToggleStateFromNewSettings(); SetToggleButtonDefault(); + SetWriteButtonDefault(); } private void RefreshToggleStateFromNewSettings() @@ -191,7 +191,7 @@ private void SetWriteButtonDefault() { WriteButton.Font = DefaultButtonFont; WriteButton.Text = Constants.WriteButtonDefaultText; - WriteButton.Enabled = true; + WriteButton.Enabled = ToggleButton.Checked || !ToggleButton.Enabled; WriteButton.Update(); } @@ -230,8 +230,8 @@ private void OnToggleButtonClick(object sender, EventArgs e) private void OnButtonTimerTick(object sender, EventArgs e) { ButtonTimer.Stop(); - SetWriteButtonDefault(); SetToggleButtonDefault(); + SetWriteButtonDefault(); } private void StartButtonTimer() From bcacf971e4cace869243edd5fff3fdb435d48c44 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 8 Oct 2020 23:08:11 -0400 Subject: [PATCH 10/10] add magic number to constants --- grapher/Constants/Constants.cs | 4 +++- grapher/Models/AccelGUI.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/grapher/Constants/Constants.cs b/grapher/Constants/Constants.cs index c207b6de..d669d25b 100644 --- a/grapher/Constants/Constants.cs +++ b/grapher/Constants/Constants.cs @@ -60,6 +60,8 @@ public static class Constants /// Vertical placement of write button above bottom of sensitivity graph public const int ButtonVerticalOffset = 60; + public const float SmallButtonSizeFactor = 0.666f; + /// Format string for shortened x and y textboxes. public const string ShortenedFormatString = "0.###"; @@ -89,7 +91,7 @@ public static class Constants /// Default text to be displayed on button delay. public const string ButtonDelayText = "Delay"; - + /// Title of sensitivity chart. public const string SensitivityChartTitle = "Sensitivity"; diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index f75d2840..dd1e37de 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -38,7 +38,7 @@ public AccelGUI( AccelForm.DoResize(); DefaultButtonFont = WriteButton.Font; - SmallButtonFont = new Font(WriteButton.Font.Name, WriteButton.Font.Size * 0.666f); + SmallButtonFont = new Font(WriteButton.Font.Name, WriteButton.Font.Size * Constants.SmallButtonSizeFactor); MouseWatcher = mouseWatcher;