diff options
| author | Jacob Palecki <[email protected]> | 2021-04-06 17:55:57 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2021-04-06 17:55:57 -0700 |
| commit | 5b519e7f8614953263d3c47690ecec0b8f07eb17 (patch) | |
| tree | d10c070259b8a13d7c33d3224228230af66378b4 | |
| parent | Fix checkbox not snapping (diff) | |
| download | rawaccel-5b519e7f8614953263d3c47690ecec0b8f07eb17.tar.xz rawaccel-5b519e7f8614953263d3c47690ecec0b8f07eb17.zip | |
Remove cap and offset style switches
| -rw-r--r-- | grapher/Form1.Designer.cs | 110 | ||||
| -rw-r--r-- | grapher/Form1.cs | 4 | ||||
| -rw-r--r-- | grapher/Models/AccelGUIFactory.cs | 31 | ||||
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 14 |
4 files changed, 37 insertions, 122 deletions
diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index e0c44bc..34ad2eb 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -71,6 +71,8 @@ namespace grapher 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.optionsPanel = new System.Windows.Forms.Panel(); + this.gainSwitchY = new System.Windows.Forms.CheckBox(); + this.gainSwitchX = new System.Windows.Forms.CheckBox(); this.LUTTextLabelY = new System.Windows.Forms.Label(); this.LUTTextLabelX = new System.Windows.Forms.Label(); this.FakeBox = new System.Windows.Forms.CheckBox(); @@ -175,12 +177,6 @@ namespace grapher this.showVelocityGainToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.showLastMouseMoveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.advancedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.capStyleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.gainCapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.legacyCapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.offsetStyleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.gainOffsetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.legacyOffsetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.AutoWriteMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.UseSpecificDeviceMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.chartsPanel = new System.Windows.Forms.Panel(); @@ -190,8 +186,6 @@ namespace grapher 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.gainSwitchX = new System.Windows.Forms.CheckBox(); - this.gainSwitchY = new System.Windows.Forms.CheckBox(); this.optionsPanel.SuspendLayout(); this.DirectionalityPanel.SuspendLayout(); this.menuStrip1.SuspendLayout(); @@ -291,6 +285,30 @@ namespace grapher this.optionsPanel.Size = new System.Drawing.Size(483, 956); this.optionsPanel.TabIndex = 34; // + // gainSwitchY + // + this.gainSwitchY.AutoSize = true; + this.gainSwitchY.Checked = true; + this.gainSwitchY.CheckState = System.Windows.Forms.CheckState.Checked; + this.gainSwitchY.Location = new System.Drawing.Point(283, 116); + this.gainSwitchY.Name = "gainSwitchY"; + this.gainSwitchY.Size = new System.Drawing.Size(48, 17); + this.gainSwitchY.TabIndex = 155; + this.gainSwitchY.Text = "Gain"; + this.gainSwitchY.UseVisualStyleBackColor = true; + // + // gainSwitchX + // + this.gainSwitchX.AutoSize = true; + this.gainSwitchX.Checked = true; + this.gainSwitchX.CheckState = System.Windows.Forms.CheckState.Checked; + this.gainSwitchX.Location = new System.Drawing.Point(38, 116); + this.gainSwitchX.Name = "gainSwitchX"; + this.gainSwitchX.Size = new System.Drawing.Size(48, 17); + this.gainSwitchX.TabIndex = 154; + this.gainSwitchX.Text = "Gain"; + this.gainSwitchX.UseVisualStyleBackColor = true; + // // LUTTextLabelY // this.LUTTextLabelY.AutoSize = true; @@ -1202,58 +1220,12 @@ namespace grapher // advancedToolStripMenuItem // this.advancedToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.capStyleToolStripMenuItem, - this.offsetStyleToolStripMenuItem, this.AutoWriteMenuItem, this.UseSpecificDeviceMenuItem}); this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem"; this.advancedToolStripMenuItem.Size = new System.Drawing.Size(72, 20); this.advancedToolStripMenuItem.Text = "Advanced"; // - // capStyleToolStripMenuItem - // - this.capStyleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.gainCapToolStripMenuItem, - this.legacyCapToolStripMenuItem}); - this.capStyleToolStripMenuItem.Name = "capStyleToolStripMenuItem"; - this.capStyleToolStripMenuItem.Size = new System.Drawing.Size(210, 22); - this.capStyleToolStripMenuItem.Text = "Cap Style"; - // - // gainCapToolStripMenuItem - // - 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)"; - // - // legacyCapToolStripMenuItem - // - this.legacyCapToolStripMenuItem.Name = "legacyCapToolStripMenuItem"; - this.legacyCapToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.legacyCapToolStripMenuItem.Text = "Legacy"; - // - // offsetStyleToolStripMenuItem - // - this.offsetStyleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.gainOffsetToolStripMenuItem, - this.legacyOffsetToolStripMenuItem}); - this.offsetStyleToolStripMenuItem.Name = "offsetStyleToolStripMenuItem"; - this.offsetStyleToolStripMenuItem.Size = new System.Drawing.Size(210, 22); - this.offsetStyleToolStripMenuItem.Text = "Offset Style"; - // - // gainOffsetToolStripMenuItem - // - this.gainOffsetToolStripMenuItem.Name = "gainOffsetToolStripMenuItem"; - this.gainOffsetToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.gainOffsetToolStripMenuItem.Text = "Gain (Default)"; - // - // legacyOffsetToolStripMenuItem - // - this.legacyOffsetToolStripMenuItem.Name = "legacyOffsetToolStripMenuItem"; - this.legacyOffsetToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.legacyOffsetToolStripMenuItem.Text = "Legacy"; - // // AutoWriteMenuItem // this.AutoWriteMenuItem.Checked = true; @@ -1521,30 +1493,6 @@ namespace grapher title6.Text = "Sensitivity"; this.AccelerationChart.Titles.Add(title6); // - // gainSwitchX - // - this.gainSwitchX.AutoSize = true; - this.gainSwitchX.Checked = true; - this.gainSwitchX.CheckState = System.Windows.Forms.CheckState.Checked; - this.gainSwitchX.Location = new System.Drawing.Point(38, 116); - this.gainSwitchX.Name = "gainSwitchX"; - this.gainSwitchX.Size = new System.Drawing.Size(48, 17); - this.gainSwitchX.TabIndex = 154; - this.gainSwitchX.Text = "Gain"; - this.gainSwitchX.UseVisualStyleBackColor = true; - // - // gainSwitchY - // - this.gainSwitchY.AutoSize = true; - this.gainSwitchY.Checked = true; - this.gainSwitchY.CheckState = System.Windows.Forms.CheckState.Checked; - this.gainSwitchY.Location = new System.Drawing.Point(283, 116); - this.gainSwitchY.Name = "gainSwitchY"; - this.gainSwitchY.Size = new System.Drawing.Size(48, 17); - this.gainSwitchY.TabIndex = 155; - this.gainSwitchY.Text = "Gain"; - this.gainSwitchY.UseVisualStyleBackColor = true; - // // RawAcceleration // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1656,12 +1604,6 @@ namespace grapher 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.Panel chartsPanel; private System.Windows.Forms.DataVisualization.Charting.Chart GainChartY; private System.Windows.Forms.DataVisualization.Charting.Chart VelocityChartY; diff --git a/grapher/Form1.cs b/grapher/Form1.cs index 5d0b805..c7c2723 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -63,10 +63,6 @@ namespace grapher toggleButton, showVelocityGainToolStripMenuItem, showLastMouseMoveToolStripMenuItem, - gainCapToolStripMenuItem, - legacyCapToolStripMenuItem, - gainOffsetToolStripMenuItem, - legacyOffsetToolStripMenuItem, AutoWriteMenuItem, UseSpecificDeviceMenuItem, ScaleMenuItem, diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index de2d99c..6bfc510 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -29,10 +29,6 @@ namespace grapher.Models ButtonBase toggleButton, ToolStripMenuItem showVelocityGainToolStripMenuItem, ToolStripMenuItem showLastMouseMoveMenuItem, - ToolStripMenuItem velocityGainCapToolStripMenuItem, - ToolStripMenuItem legacyCapToolStripMenuItem, - ToolStripMenuItem gainOffsetToolStripMenuItem, - ToolStripMenuItem legacyOffsetToolStripMenuItem, ToolStripMenuItem autoWriteMenuItem, ToolStripMenuItem useSpecificDeviceMenuItem, ToolStripMenuItem scaleMenuItem, @@ -226,16 +222,6 @@ namespace grapher.Models new ActiveValueLabel(offsetActiveLabelY, activeValueTitleY), "Offset"); - var offsetOptionsX = new OffsetOptions( - gainOffsetToolStripMenuItem, - legacyOffsetToolStripMenuItem, - offsetX); - - var offsetOptionsY = new OffsetOptions( - gainOffsetToolStripMenuItem, - legacyOffsetToolStripMenuItem, - offsetY); - var accelerationX = new Option( new Field(accelerationBoxX, form, 0), constantOneLabelX, @@ -326,15 +312,6 @@ namespace grapher.Models new ActiveValueLabel(rangeActiveValueY, direcionalityActiveValueTitle)), false); - var capOptionsX = new CapOptions( - velocityGainCapToolStripMenuItem, - legacyCapToolStripMenuItem, - capX); - - var capOptionsY = new CapOptions( - velocityGainCapToolStripMenuItem, - legacyCapToolStripMenuItem, - capY); var lutTextX = new TextOption(lutTextLabelX); var lutTextY = new TextOption(lutTextLabelY); @@ -346,9 +323,9 @@ namespace grapher.Models gainSwitchOptionX, accelerationX, scaleX, - capOptionsX, + capX, weightX, - offsetOptionsX, + offsetX, limitX, exponentX, midpointX, @@ -361,9 +338,9 @@ namespace grapher.Models gainSwitchOptionY, accelerationY, scaleY, - capOptionsY, + capY, weightY, - offsetOptionsY, + offsetY, limitY, exponentY, midpointY, diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index 851c44d..60bb53d 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -35,9 +35,9 @@ namespace grapher CheckBoxOption gainSwitch, Option acceleration, Option scale, - CapOptions cap, + Option cap, Option weight, - OffsetOptions offset, + Option offset, Option limit, Option exponent, Option midpoint, @@ -96,11 +96,11 @@ namespace grapher public Option Scale { get; } - public CapOptions Cap { get; } + public Option Cap { get; } public Option Weight { get; } - public OffsetOptions Offset { get; } + public Option Offset { get; } public Option Limit { get; } @@ -208,7 +208,7 @@ namespace grapher AccelDropdown.SelectedIndex = AccelerationType.Index; Weight.SetActiveValue(args.weight); - Cap.SetActiveValues(args.cap, args.legacy); + Cap.SetActiveValue(args.cap); Offset.SetActiveValue(args.offset); Acceleration.SetActiveValue(AccelerationParameterFromArgs(args)); Scale.SetActiveValue(args.scale); @@ -263,10 +263,10 @@ namespace grapher args.legacy = !GainSwitch.CheckBox.Checked; if (Scale.Visible) args.scale = Scale.Field.Data; - if (Cap.Visible) args.cap = Cap.SensitivityCap; + if (Cap.Visible) args.cap = Cap.Field.Data; if (Limit.Visible) args.limit = Limit.Field.Data; if (Exponent.Visible) args.exponent = Exponent.Field.Data; - if (Offset.Visible) args.offset = Offset.Offset; + if (Offset.Visible) args.offset = Offset.Field.Data; if (Midpoint.Visible) args.midpoint = Midpoint.Field.Data; if (Weight.Visible) args.weight = Weight.Field.Data; } |