コード例 #1
0
        public Calibration_VM()
        {
            PreviousScreenCommand = new RelayCommand(GoBackToPreviousScreen, CanGoBack);
            RunCalibrationCommand = new RelayCommand(RunCalibration, CalibrationCanBegin);

            // so binding doesn't break
            TorqueTestVm = new FullyReversedTorqueTest_VM();
        }
コード例 #2
0
        // wait a few seconds after the test is complete to run this.
        private void T_Tick(object sender, EventArgs e)
        {
            try
            {
                //clean up the TorqueTestVm.
                TorqueTestVm.Dispose();

                // start up the test UI.
                MainWindow_VM.Instance.CurrentViewModel = MainWindow_VM.Instance.SteeringShaftTestVm;
                FullyReversedTorqueTest_VM vm = MainWindow_VM.Instance.CurrentViewModel as FullyReversedTorqueTest_VM;

                // set these so the test screen shows up normal again.
                vm.IsTestIdNeeded = false;
                vm.DisplayTempMessage(Business.Shared.Messages.StartButtonMessage(), vm.GOOD_MESSAGE_BRUSH, 0);

                // starts up the test monitoring.
                vm.PrepareToTest(MainWindow_VM.Instance.TestSession);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.ToString());
            }
        }