From 30e1391b224ae028f4476e06a07415a0285ac6c9 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Wed, 12 Aug 2020 20:39:53 -0700 Subject: Almost working --- grapher/Form1.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'grapher/Form1.cs') diff --git a/grapher/Form1.cs b/grapher/Form1.cs index da9bd5f..a90cfbc 100644 --- a/grapher/Form1.cs +++ b/grapher/Form1.cs @@ -89,10 +89,19 @@ namespace grapher Marshal.FreeHGlobal(args_ptr); - var sensitivity = new OptionXY(sensitivityBoxX, sensitivityBoxY, sensXYLock, this, 1, sensitivityLabel, "Sensitivity"); + var accelCharts = new AccelCharts( + this, + new ChartXY(AccelerationChart, AccelerationChartY), + new ChartXY(VelocityChart, VelocityChartY), + new ChartXY(GainChart, GainChartY), + showVelocityGainToolStripMenuItem, + new CheckBox[] { sensXYLock, weightXYLock, capXYLock }); + + + var sensitivity = new OptionXY(sensitivityBoxX, sensitivityBoxY, sensXYLock, this, 1, sensitivityLabel, "Sensitivity", accelCharts); var rotation = new Option(rotationBox, this, 0, rotationLabel, "Rotation"); - var weight = new OptionXY(weightBoxFirst, weightBoxSecond, weightXYLock, this, 1, weightLabel, "Weight"); - var cap = new OptionXY(capBoxX, capBoxY, capXYLock, this, 0, capLabel, "Cap"); + var weight = new OptionXY(weightBoxFirst, weightBoxSecond, weightXYLock, this, 1, weightLabel, "Weight", accelCharts); + var cap = new OptionXY(capBoxX, capBoxY, capXYLock, this, 0, capLabel, "Cap", accelCharts); var offset = new Option(offsetBox, this, 0, offsetLabel, "Offset"); // The name and layout of these options is handled by AccelerationOptions object. @@ -124,12 +133,7 @@ namespace grapher AccelGUI = new AccelGUI( this, - new AccelCharts( - this, - new ChartXY(AccelerationChart, AccelerationChartY), - new ChartXY(VelocityChart, VelocityChartY), - new ChartXY(GainChart, GainChartY), - showVelocityGainToolStripMenuItem), + accelCharts, managedAcceleration, accelerationOptions, sensitivity, -- cgit v1.2.3