diff options
| author | Jacob Palecki <[email protected]> | 2020-07-29 21:26:13 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-07-29 21:26:13 -0700 |
| commit | d7e1121eb62b9842f9d19bddaf3e633d3dbe0924 (patch) | |
| tree | d5a96e92e1ecf2d99741dfde348c858c251d0a0c | |
| parent | Fix a few bugs around fieldXY (diff) | |
| download | rawaccel-d7e1121eb62b9842f9d19bddaf3e633d3dbe0924.tar.xz rawaccel-d7e1121eb62b9842f9d19bddaf3e633d3dbe0924.zip | |
Adde accel type switch
| -rw-r--r-- | grapher/Form1.Designer.cs | 29 | ||||
| -rw-r--r-- | grapher/Form1.cs | 28 |
2 files changed, 43 insertions, 14 deletions
diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs index c7be8c7..09a4da3 100644 --- a/grapher/Form1.Designer.cs +++ b/grapher/Form1.Designer.cs @@ -28,9 +28,9 @@ /// </summary> private void InitializeComponent() { - 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 series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); this.AccelerationChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); this.accelTypeDrop = new System.Windows.Forms.ComboBox(); this.sensitivityBoxX = new System.Windows.Forms.TextBox(); @@ -62,19 +62,19 @@ // // AccelerationChart // - chartArea2.AxisX.Title = "Speed (counts/ms)"; - chartArea2.AxisY.Title = "Sensitivity (magnitude ratio)"; - chartArea2.Name = "ChartArea1"; - this.AccelerationChart.ChartAreas.Add(chartArea2); - legend2.Name = "Legend1"; - this.AccelerationChart.Legends.Add(legend2); + chartArea1.AxisX.Title = "Speed (counts/ms)"; + chartArea1.AxisY.Title = "Sensitivity (magnitude ratio)"; + chartArea1.Name = "ChartArea1"; + this.AccelerationChart.ChartAreas.Add(chartArea1); + legend1.Name = "Legend1"; + this.AccelerationChart.Legends.Add(legend1); this.AccelerationChart.Location = new System.Drawing.Point(242, 1); this.AccelerationChart.Name = "AccelerationChart"; - series2.ChartArea = "ChartArea1"; - series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series2.Legend = "Legend1"; - series2.Name = "Accelerated Sensitivity"; - this.AccelerationChart.Series.Add(series2); + series1.ChartArea = "ChartArea1"; + series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series1.Legend = "Legend1"; + series1.Name = "Accelerated Sensitivity"; + this.AccelerationChart.Series.Add(series1); this.AccelerationChart.Size = new System.Drawing.Size(721, 312); this.AccelerationChart.TabIndex = 0; this.AccelerationChart.Text = "chart1"; @@ -95,6 +95,7 @@ this.accelTypeDrop.Size = new System.Drawing.Size(151, 21); this.accelTypeDrop.TabIndex = 2; this.accelTypeDrop.Text = "Acceleration Type"; + this.accelTypeDrop.SelectedIndexChanged += new System.EventHandler(this.accelTypeDrop_SelectedIndexChanged); // // sensitivityBoxX // diff --git a/grapher/Form1.cs b/grapher/Form1.cs index 2bc4da7..8dd4b8b 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -166,5 +166,33 @@ namespace grapher } #endregion Methods + + private void accelTypeDrop_SelectedIndexChanged(object sender, EventArgs e) + { + switch(this.accelTypeDrop.SelectedItem.ToString()) + { + case ("Linear"): + AccelerationType = 1; + break; + case ("Classic"): + AccelerationType = 2; + break; + case ("Natural"): + AccelerationType = 3; + break; + case ("Logarithmic"): + AccelerationType = 4; + break; + case ("Sigmoid"): + AccelerationType = 5; + break; + case ("Power"): + AccelerationType = 6; + break; + default: + AccelerationType = 0; + break; + } + } } } |