void laser_InfoChanged(LaserEquipment laser) { laserProgramsTable.Programs = laser.Programs; string status = (laser.Online) ? "Online" : "Offline"; Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => updateLaserStatus(status))); }
void laserComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { updateLaserStatus("Connecting"); LaserEquipment laser = (LaserEquipment)laserComboBox.SelectedItem; settings.SelectedLaser = laser.Id; laser.InfoChanged += laser_InfoChanged; laser.LoadPrograms(); laserPropertiesTable.Laser = laser; selection.Laser = laser; }
void laser_PortBusy(LaserEquipment laser) { laserProgramsTable.Clear(); Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => updateLaserStatus("Busy"))); }