예제 #1
0
        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);
            }
        }
예제 #2
0
 public void Handle(InstrumentUpdateEvent message)
 {
     _instrumentManager = message.InstrumentManager;
 }
예제 #3
0
 public InstrumentUpdateEvent(RotaryTestManager instrumentManager)
 {
     InstrumentManager = instrumentManager;
 }