void AxisActive_CheckBox(object sender, RoutedEventArgs e) { CheckBox c = sender as CheckBox; if (c != null) { AxisProperties ap = AxisProperties.FindAxis(Recorder.AxisOptions, c.Name); if (ap != null) { ap.Active = (c.IsChecked == true); } } }
public void UpdateAxisInfoState() { for (int k = 1; k <= 8; k++) { AxisProperties ap = AxisProperties.FindAxis(Recorder.AxisOptions, k); string id = k.ToString(); StackPanel sp = Recorder.FindName("AxisInfo" + id) as StackPanel; if (sp != null) { sp.Visibility = ((ap == null) ? Visibility.Collapsed : Visibility.Visible); } } }
void AxisShow_CheckBox(object sender, RoutedEventArgs e) { CheckBox c = sender as CheckBox; if (c != null) { AxisProperties ap = AxisProperties.FindAxis(Recorder.AxisOptions, c.Name); if (ap != null) { ap.Show = (c.IsChecked == true); Recorder.RecorderScope.SetAxisVisibility(ap); } } }
void AxisState_Click(object sender, RoutedEventArgs e) { Button b = sender as Button; if (b != null) { AxisProperties ap = AxisProperties.FindAxis(Recorder.AxisOptions, b.Name); if (ap != null) { Controller.IssueCommand(ap.AxisPortPropertiesIndex, AxesController.AXIS_CMD_RESET, 1, (byte)ap.DeviceRank, 0); } } }
public void SetAxisVisibility(int axisId) { SetAxisVisibility(AxisProperties.FindAxis(Recorder.AxisOptions, axisId)); }