public async Task InitializeTest() { SettingsManager.Save(); try { var commPort = new SerialPort(InstrumentCommPortName, BaudRate); if (IsMiniMaxChecked) { InstrumentTestManager = await RotaryTestManager.CreateRotaryTest(_container, new HoneywellClient(commPort, InstrumentType.MiniMax), TachCommPortName, null); await InstrumentTestManager.RunVerifier(); } else if (IsMiniATChecked) { InstrumentTestManager = await MechanicalTestManager.Create(_container, new HoneywellClient(commPort, InstrumentType.MiniAT)); } await ScreenManager.Change(_container, new VerificationTestViewModel(_container, InstrumentTestManager)); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK); } }
public void Handle(InstrumentUpdateEvent message) { _instrumentManager = message.InstrumentManager; }
public InstrumentUpdateEvent(RotaryTestManager instrumentManager) { InstrumentManager = instrumentManager; }