public AxisSetupForm(AxisMapping axisMapping) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.axisMapping = axisMapping; this.parameters = axisMapping.Parameters; DialogResult = DialogResult.Cancel; MainForm.Instance.ChannelDataUpdate += onChannelDataUpdate; Disposed += delegate(object sender, EventArgs e) { MainForm.Instance.ChannelDataUpdate -= onChannelDataUpdate; }; numericMin.Value = parameters.Min; numericMax.Value = parameters.Max; numericCenter.Value = parameters.Center; numericExpo.Value = parameters.Expo; numericDeadband.Value = parameters.Deadband; checkInvert.Checked = parameters.Invert; checkSymmetric.Checked = parameters.Symmetric; initialized = true; OnChange(null, null); }
Mapping addAxis() { var ax = new AxisMapping(); mappings.Add(ax); panelMappings.Controls.Add(ax.GetControl()); return(ax); }
public override Mapping Copy() { var am = new AxisMapping(); am.Parameters = Parameters; am.Channel = Channel; am.Axis = Axis; return(am); }