public AccelCharts( RawAcceleration form, ChartXY sensitivityChart, ChartXY velocityChart, ChartXY gainChart, ToolStripMenuItem enableVelocityAndGain, ToolStripMenuItem enableLastMouseMove, Button writeButton, AccelCalculator accelCalculator) { var estimated = new EstimatedPoints(); var estimatedX = new EstimatedPoints(); var estimatedY = new EstimatedPoints(); SetupCharts(sensitivityChart, velocityChart, gainChart, estimated, estimatedX, estimatedY); var accelData = new AccelData(estimated, estimatedX, estimatedY); ChartStateManager = new ChartStateManager(sensitivityChart, velocityChart, gainChart, accelData, accelCalculator); ContainingForm = form; EnableVelocityAndGain = enableVelocityAndGain; EnableLastValue = enableLastMouseMove; WriteButton = writeButton; EnableVelocityAndGain.Click += new System.EventHandler(OnEnableClick); EnableVelocityAndGain.CheckedChanged += new System.EventHandler(OnEnableVelocityGainCheckStateChange); EnableLastValue.CheckedChanged += new System.EventHandler(OnEnableLastMouseMoveCheckStateChange); ChartState = ChartStateManager.InitialState(); ChartState.Activate(); HideVelocityAndGain(); }
public void ShowActive(DriverSettings driverSettings) { ChartState = ChartStateManager.DetermineState(driverSettings); ChartState.Activate(); Bind(); }