summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-01 23:36:52 -0700
committerJacob Palecki <[email protected]>2020-09-01 23:36:52 -0700
commitbf747ca2439a371ef74e21a49c1e8bc880d4d3e2 (patch)
tree6265bea551877d84803d731cec7cd0b3b3d823ac
parentSecond half - the parts in place (diff)
downloadrawaccel-bf747ca2439a371ef74e21a49c1e8bc880d4d3e2.tar.xz
rawaccel-bf747ca2439a371ef74e21a49c1e8bc880d4d3e2.zip
Small fixes, correctly align labels and boxes
-rw-r--r--grapher/Form1.Designer.cs254
-rw-r--r--grapher/Layouts/NaturalLayout.cs2
-rw-r--r--grapher/Models/AccelGUIFactory.cs31
-rw-r--r--grapher/Models/Options/AccelOptionSet.cs4
-rw-r--r--grapher/Models/Options/Option.cs18
5 files changed, 168 insertions, 141 deletions
diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs
index 22ae1b8..af60be1 100644
--- a/grapher/Form1.Designer.cs
+++ b/grapher/Form1.Designer.cs
@@ -30,30 +30,30 @@ namespace grapher
/// </summary>
private void InitializeComponent()
{
- System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea7 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend7 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- 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.ChartArea chartArea8 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend8 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- 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.ChartArea chartArea9 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend9 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- 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.ChartArea chartArea10 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend10 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- 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.ChartArea chartArea11 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend11 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- System.Windows.Forms.DataVisualization.Charting.Series series21 = new System.Windows.Forms.DataVisualization.Charting.Series();
- System.Windows.Forms.DataVisualization.Charting.Series series22 = new System.Windows.Forms.DataVisualization.Charting.Series();
- System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea12 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
- System.Windows.Forms.DataVisualization.Charting.Legend legend12 = new System.Windows.Forms.DataVisualization.Charting.Legend();
- System.Windows.Forms.DataVisualization.Charting.Series series23 = new System.Windows.Forms.DataVisualization.Charting.Series();
- System.Windows.Forms.DataVisualization.Charting.Series series24 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea13 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend13 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series25 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Series series26 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea14 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend14 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series27 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Series series28 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea15 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend15 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series29 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Series series30 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea16 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend16 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series31 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Series series32 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea17 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend17 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series33 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Series series34 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea18 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+ System.Windows.Forms.DataVisualization.Charting.Legend legend18 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+ System.Windows.Forms.DataVisualization.Charting.Series series35 = new System.Windows.Forms.DataVisualization.Charting.Series();
+ System.Windows.Forms.DataVisualization.Charting.Series series36 = new System.Windows.Forms.DataVisualization.Charting.Series();
this.AccelerationChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.accelTypeDropX = new System.Windows.Forms.ComboBox();
this.sensitivityBoxX = new System.Windows.Forms.TextBox();
@@ -145,25 +145,25 @@ namespace grapher
//
// AccelerationChart
//
- chartArea7.AxisX.Title = "Speed (counts/ms)";
- chartArea7.AxisY.Title = "Sensitivity (magnitude ratio)";
- chartArea7.Name = "ChartArea1";
- this.AccelerationChart.ChartAreas.Add(chartArea7);
- legend7.Name = "Legend1";
- this.AccelerationChart.Legends.Add(legend7);
+ chartArea13.AxisX.Title = "Speed (counts/ms)";
+ chartArea13.AxisY.Title = "Sensitivity (magnitude ratio)";
+ chartArea13.Name = "ChartArea1";
+ this.AccelerationChart.ChartAreas.Add(chartArea13);
+ legend13.Name = "Legend1";
+ this.AccelerationChart.Legends.Add(legend13);
this.AccelerationChart.Location = new System.Drawing.Point(432, 0);
this.AccelerationChart.Name = "AccelerationChart";
- 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 = "LastAccelVal";
- this.AccelerationChart.Series.Add(series13);
- this.AccelerationChart.Series.Add(series14);
+ series25.ChartArea = "ChartArea1";
+ series25.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+ series25.Legend = "Legend1";
+ series25.Name = "Accelerated Sensitivity";
+ series26.ChartArea = "ChartArea1";
+ series26.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+ series26.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ series26.Legend = "Legend1";
+ series26.Name = "LastAccelVal";
+ this.AccelerationChart.Series.Add(series25);
+ this.AccelerationChart.Series.Add(series26);
this.AccelerationChart.Size = new System.Drawing.Size(723, 328);
this.AccelerationChart.TabIndex = 0;
this.AccelerationChart.Text = "Sensitivity";
@@ -258,7 +258,7 @@ namespace grapher
this.weightLabelX.Size = new System.Drawing.Size(41, 13);
this.weightLabelX.TabIndex = 13;
this.weightLabelX.Text = "Weight";
- this.weightLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.weightLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// weightBoxY
//
@@ -364,50 +364,50 @@ namespace grapher
//
// VelocityChart
//
- chartArea8.AxisX.Title = "Speed (count/ms)";
- chartArea8.AxisY.Title = "Output Speed (counts/ms)";
- chartArea8.Name = "ChartArea1";
- this.VelocityChart.ChartAreas.Add(chartArea8);
- legend8.Name = "Legend1";
- this.VelocityChart.Legends.Add(legend8);
+ chartArea14.AxisX.Title = "Speed (count/ms)";
+ chartArea14.AxisY.Title = "Output Speed (counts/ms)";
+ chartArea14.Name = "ChartArea1";
+ this.VelocityChart.ChartAreas.Add(chartArea14);
+ legend14.Name = "Legend1";
+ this.VelocityChart.Legends.Add(legend14);
this.VelocityChart.Location = new System.Drawing.Point(432, 334);
this.VelocityChart.Name = "VelocityChart";
- series15.ChartArea = "ChartArea1";
- series15.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
- series15.Legend = "Legend1";
- series15.Name = "Mouse Velocity";
- series16.ChartArea = "ChartArea1";
- series16.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
- series16.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- series16.Legend = "Legend1";
- series16.Name = "LastVelocityVal";
- this.VelocityChart.Series.Add(series15);
- this.VelocityChart.Series.Add(series16);
+ series27.ChartArea = "ChartArea1";
+ series27.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+ series27.Legend = "Legend1";
+ series27.Name = "Mouse Velocity";
+ series28.ChartArea = "ChartArea1";
+ series28.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+ series28.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ series28.Legend = "Legend1";
+ series28.Name = "LastVelocityVal";
+ this.VelocityChart.Series.Add(series27);
+ this.VelocityChart.Series.Add(series28);
this.VelocityChart.Size = new System.Drawing.Size(723, 307);
this.VelocityChart.TabIndex = 28;
this.VelocityChart.Text = "chart1";
//
// GainChart
//
- chartArea9.AxisX.Title = "Speed (counts/ms)";
- chartArea9.AxisY.Title = "Slope of Velocity Chart";
- chartArea9.Name = "ChartArea1";
- this.GainChart.ChartAreas.Add(chartArea9);
- legend9.Name = "Legend1";
- this.GainChart.Legends.Add(legend9);
+ chartArea15.AxisX.Title = "Speed (counts/ms)";
+ chartArea15.AxisY.Title = "Slope of Velocity Chart";
+ chartArea15.Name = "ChartArea1";
+ this.GainChart.ChartAreas.Add(chartArea15);
+ legend15.Name = "Legend1";
+ this.GainChart.Legends.Add(legend15);
this.GainChart.Location = new System.Drawing.Point(432, 647);
this.GainChart.Name = "GainChart";
- series17.ChartArea = "ChartArea1";
- series17.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
- series17.Legend = "Legend1";
- series17.Name = "Velocity Gain";
- series18.ChartArea = "ChartArea1";
- series18.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
- series18.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- series18.Legend = "Legend1";
- series18.Name = "LastGainVal";
- this.GainChart.Series.Add(series17);
- this.GainChart.Series.Add(series18);
+ series29.ChartArea = "ChartArea1";
+ series29.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+ series29.Legend = "Legend1";
+ series29.Name = "Velocity Gain";
+ series30.ChartArea = "ChartArea1";
+ series30.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+ series30.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ series30.Legend = "Legend1";
+ series30.Name = "LastGainVal";
+ this.GainChart.Series.Add(series29);
+ this.GainChart.Series.Add(series30);
this.GainChart.Size = new System.Drawing.Size(723, 309);
this.GainChart.TabIndex = 29;
this.GainChart.Text = "chart1";
@@ -561,75 +561,75 @@ namespace grapher
//
// AccelerationChartY
//
- chartArea10.AxisX.Title = "Speed (counts/ms)";
- chartArea10.AxisY.Title = "Sensitivity (magnitude ratio)";
- chartArea10.Name = "ChartArea1";
- this.AccelerationChartY.ChartAreas.Add(chartArea10);
- legend10.Name = "Legend1";
- this.AccelerationChartY.Legends.Add(legend10);
+ chartArea16.AxisX.Title = "Speed (counts/ms)";
+ chartArea16.AxisY.Title = "Sensitivity (magnitude ratio)";
+ chartArea16.Name = "ChartArea1";
+ this.AccelerationChartY.ChartAreas.Add(chartArea16);
+ legend16.Name = "Legend1";
+ this.AccelerationChartY.Legends.Add(legend16);
this.AccelerationChartY.Location = new System.Drawing.Point(1161, 0);
this.AccelerationChartY.Name = "AccelerationChartY";
- series19.ChartArea = "ChartArea1";
- series19.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
- series19.Legend = "Legend1";
- series19.Name = "Accelerated Sensitivity";
- 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 = "LastAccelVal";
- this.AccelerationChartY.Series.Add(series19);
- this.AccelerationChartY.Series.Add(series20);
+ series31.ChartArea = "ChartArea1";
+ series31.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+ series31.Legend = "Legend1";
+ series31.Name = "Accelerated Sensitivity";
+ series32.ChartArea = "ChartArea1";
+ series32.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+ series32.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ series32.Legend = "Legend1";
+ series32.Name = "LastAccelVal";
+ this.AccelerationChartY.Series.Add(series31);
+ this.AccelerationChartY.Series.Add(series32);
this.AccelerationChartY.Size = new System.Drawing.Size(723, 328);
this.AccelerationChartY.TabIndex = 31;
this.AccelerationChartY.Text = "chart1";
//
// VelocityChartY
//
- chartArea11.AxisX.Title = "Speed (count/ms)";
- chartArea11.AxisY.Title = "Output Speed (counts/ms)";
- chartArea11.Name = "ChartArea1";
- this.VelocityChartY.ChartAreas.Add(chartArea11);
- legend11.Name = "Legend1";
- this.VelocityChartY.Legends.Add(legend11);
+ chartArea17.AxisX.Title = "Speed (count/ms)";
+ chartArea17.AxisY.Title = "Output Speed (counts/ms)";
+ chartArea17.Name = "ChartArea1";
+ this.VelocityChartY.ChartAreas.Add(chartArea17);
+ legend17.Name = "Legend1";
+ this.VelocityChartY.Legends.Add(legend17);
this.VelocityChartY.Location = new System.Drawing.Point(1161, 334);
this.VelocityChartY.Name = "VelocityChartY";
- series21.ChartArea = "ChartArea1";
- series21.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
- series21.Legend = "Legend1";
- series21.Name = "Mouse Velocity";
- series22.ChartArea = "ChartArea1";
- series22.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
- series22.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- series22.Legend = "Legend1";
- series22.Name = "LastVelocityVal";
- this.VelocityChartY.Series.Add(series21);
- this.VelocityChartY.Series.Add(series22);
+ series33.ChartArea = "ChartArea1";
+ series33.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+ series33.Legend = "Legend1";
+ series33.Name = "Mouse Velocity";
+ series34.ChartArea = "ChartArea1";
+ series34.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+ series34.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ series34.Legend = "Legend1";
+ series34.Name = "LastVelocityVal";
+ this.VelocityChartY.Series.Add(series33);
+ this.VelocityChartY.Series.Add(series34);
this.VelocityChartY.Size = new System.Drawing.Size(723, 307);
this.VelocityChartY.TabIndex = 32;
this.VelocityChartY.Text = "chart1";
//
// GainChartY
//
- chartArea12.AxisX.Title = "Speed (counts/ms)";
- chartArea12.AxisY.Title = "Slope of Velocity Chart";
- chartArea12.Name = "ChartArea1";
- this.GainChartY.ChartAreas.Add(chartArea12);
- legend12.Name = "Legend1";
- this.GainChartY.Legends.Add(legend12);
+ chartArea18.AxisX.Title = "Speed (counts/ms)";
+ chartArea18.AxisY.Title = "Slope of Velocity Chart";
+ chartArea18.Name = "ChartArea1";
+ this.GainChartY.ChartAreas.Add(chartArea18);
+ legend18.Name = "Legend1";
+ this.GainChartY.Legends.Add(legend18);
this.GainChartY.Location = new System.Drawing.Point(1161, 647);
this.GainChartY.Name = "GainChartY";
- series23.ChartArea = "ChartArea1";
- series23.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
- series23.Legend = "Legend1";
- series23.Name = "Velocity Gain";
- series24.ChartArea = "ChartArea1";
- series24.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
- series24.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
- series24.Legend = "Legend1";
- series24.Name = "LastGainVal";
- this.GainChartY.Series.Add(series23);
- this.GainChartY.Series.Add(series24);
+ series35.ChartArea = "ChartArea1";
+ series35.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+ series35.Legend = "Legend1";
+ series35.Name = "Velocity Gain";
+ series36.ChartArea = "ChartArea1";
+ series36.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+ series36.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
+ series36.Legend = "Legend1";
+ series36.Name = "LastGainVal";
+ this.GainChartY.Series.Add(series35);
+ this.GainChartY.Series.Add(series36);
this.GainChartY.Size = new System.Drawing.Size(723, 309);
this.GainChartY.TabIndex = 33;
this.GainChartY.Text = "chart1";
diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs
index a6da67d..caa77bd 100644
--- a/grapher/Layouts/NaturalLayout.cs
+++ b/grapher/Layouts/NaturalLayout.cs
@@ -15,7 +15,7 @@ namespace grapher.Layouts
Name = "Natural";
Index = (int)AccelMode.natural;
ShowOptions = new bool[] { true, true, true, false, false, true };
- OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty };
+ OptionNames = new string[] { Offset, Acceleration, Limit, string.Empty, string.Empty, Weight };
}
}
}
diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs
index a75207b..3c2a773 100644
--- a/grapher/Models/AccelGUIFactory.cs
+++ b/grapher/Models/AccelGUIFactory.cs
@@ -114,14 +114,18 @@ namespace grapher.Models
form,
0,
rotationLabel,
+ 0,
new ActiveValueLabel(rotationActiveLabel, activeValueTitle),
"Rotation");
+ var optionSetYLeft = rotation.Left + rotation.Width;
+
var weightX = new Option(
weightBoxX,
form,
1,
weightLabelX,
+ 0,
new ActiveValueLabel(weightActiveXLabel, activeValueTitle),
"Weight");
@@ -130,6 +134,7 @@ namespace grapher.Models
form,
1,
weightLabelY,
+ optionSetYLeft,
new ActiveValueLabel(weightActiveYLabel, activeValueTitle),
"Weight");
@@ -138,6 +143,7 @@ namespace grapher.Models
form,
0,
capLabelX,
+ 0,
new ActiveValueLabel(capActiveXLabel, activeValueTitle),
"Cap");
@@ -146,6 +152,7 @@ namespace grapher.Models
form,
0,
capLabelY,
+ optionSetYLeft,
new ActiveValueLabel(capActiveYLabel, activeValueTitle),
"Cap");
@@ -154,6 +161,7 @@ namespace grapher.Models
form,
0,
offsetLabelX,
+ 0,
new ActiveValueLabel(offsetActiveLabelX, activeValueTitle),
"Offset");
@@ -162,6 +170,7 @@ namespace grapher.Models
form,
0,
offsetLabelY,
+ optionSetYLeft,
new ActiveValueLabel(offsetActiveLabelY, activeValueTitle),
"Offset");
@@ -169,32 +178,38 @@ namespace grapher.Models
var accelerationX = new Option(
new Field(accelerationBoxX, form, 0),
constantOneLabelX,
- new ActiveValueLabel(accelerationActiveLabelX, activeValueTitle));
+ new ActiveValueLabel(accelerationActiveLabelX, activeValueTitle),
+ 0);
var accelerationY = new Option(
new Field(accelerationBoxY, form, 0),
constantOneLabelY,
- new ActiveValueLabel(accelerationActiveLabelY, activeValueTitle));
+ new ActiveValueLabel(accelerationActiveLabelY, activeValueTitle),
+ optionSetYLeft);
var limitOrExponentX = new Option(
new Field(limitBoxX, form, 2),
constantTwoLabelX,
- new ActiveValueLabel(limitExpActiveLabelX, activeValueTitle));
+ new ActiveValueLabel(limitExpActiveLabelX, activeValueTitle),
+ 0);
var limitOrExponentY = new Option(
new Field(limitBoxY, form, 2),
constantTwoLabelY,
- new ActiveValueLabel(limitExpActiveLabelY, activeValueTitle));
+ new ActiveValueLabel(limitExpActiveLabelY, activeValueTitle),
+ optionSetYLeft);
var midpointX = new Option(
new Field(midpointBoxX, form, 0),
constantThreeLabelX,
- new ActiveValueLabel(midpointActiveLabelX, activeValueTitle));
+ new ActiveValueLabel(midpointActiveLabelX, activeValueTitle),
+ 0);
var midpointY = new Option(
new Field(midpointBoxY, form, 0),
constantThreeLabelY,
- new ActiveValueLabel(midpointActiveLabelY, activeValueTitle));
+ new ActiveValueLabel(midpointActiveLabelY, activeValueTitle),
+ optionSetYLeft);
var accelerationOptionsX = new AccelTypeOptions(
accelTypeDropX,
@@ -236,16 +251,18 @@ namespace grapher.Models
var optionsSetX = new AccelOptionSet(
optionSetXTitle,
+ rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
accelerationOptionsX,
accelerationX,
capOptionsX,
weightX,
offsetX,
limitOrExponentX,
- midpointX);
+ midpointX); ;
var optionsSetY = new AccelOptionSet(
optionSetYTitle,
+ rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
accelerationOptionsY,
accelerationY,
capOptionsY,
diff --git a/grapher/Models/Options/AccelOptionSet.cs b/grapher/Models/Options/AccelOptionSet.cs
index 2d15ad6..e2f2bf7 100644
--- a/grapher/Models/Options/AccelOptionSet.cs
+++ b/grapher/Models/Options/AccelOptionSet.cs
@@ -12,6 +12,7 @@ namespace grapher.Models.Options
{
public AccelOptionSet(
Label titleLabel,
+ int topAnchor,
AccelTypeOptions accelTypeOptions,
Option acceleration,
CapOptions cap,
@@ -21,6 +22,7 @@ namespace grapher.Models.Options
Option midpoint)
{
TitleLabel = titleLabel;
+ TopAnchor = topAnchor;
AccelTypeOptions = accelTypeOptions;
Acceleration = acceleration;
Cap = cap;
@@ -158,7 +160,7 @@ namespace grapher.Models.Options
private void SetOptionsTop(int top)
{
AccelTypeOptions.Top = top;
- Acceleration.Top = AccelTypeOptions.Top+ AccelTypeOptions.Height + Constants.OptionVerticalSeperation;
+ Acceleration.Top = AccelTypeOptions.Top + AccelTypeOptions.Height + Constants.OptionVerticalSeperation;
Cap.SnapTo(Acceleration);
Weight.SnapTo(Cap);
Offset.SnapTo(Weight);
diff --git a/grapher/Models/Options/Option.cs b/grapher/Models/Options/Option.cs
index 2006dec..22b78d4 100644
--- a/grapher/Models/Options/Option.cs
+++ b/grapher/Models/Options/Option.cs
@@ -15,11 +15,17 @@ namespace grapher
public Option(
Field field,
Label label,
- ActiveValueLabel activeValueLabel)
+ ActiveValueLabel activeValueLabel,
+ int left)
{
Field = field;
Label = label;
ActiveValueLabel = activeValueLabel;
+ Left = left;
+
+ label.AutoSize = false;
+ label.Width = Field.Left - left - Constants.OptionLabelBoxSeperation;
+ label.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
}
public Option(
@@ -27,11 +33,13 @@ namespace grapher
Form containingForm,
double defaultData,
Label label,
+ int left,
ActiveValueLabel activeValueLabel)
: this(
new Field(box, containingForm, defaultData),
label,
- activeValueLabel)
+ activeValueLabel,
+ left)
{
}
@@ -40,6 +48,7 @@ namespace grapher
Form containingForm,
double defaultData,
Label label,
+ int left,
ActiveValueLabel activeValueLabel,
string startingName)
: this(
@@ -47,6 +56,7 @@ namespace grapher
containingForm,
defaultData,
label,
+ left,
activeValueLabel)
{
SetName(startingName);
@@ -89,10 +99,9 @@ namespace grapher
{
return Label.Left;
}
- set
+ private set
{
Label.Left = value;
- Field.Left = value + Label.Width + Constants.OptionLabelBoxSeperation;
}
}
public int Width
@@ -111,7 +120,6 @@ namespace grapher
{
Label.Text = name;
//Label.Left = Convert.ToInt32((Field.Box.Left / 2.0) - (Label.Width / 2.0)); //Centered
- Left = Label.Left;
}
public void SetActiveValue(double value)