예제 #1
0
        private void tglStartStopVessel(object sender, RoutedEventArgs e)
        {
            if (_viewModel.ProcessIsRunning)
            {
                (_vessel as IStirrer)?.SetStirrer(0);
                (_vessel as IStirrer)?.SetStirrerSpeed(0);
                _vessel.SetTargetTemperature(_viewModel.ToBeTemperature);

                var settings = GetSettings();

                settings.PasteurTime       = _viewModel.ToBeTime;
                settings.TargetTemperature = _viewModel.ToBeTemperature;

                SetSettings(settings);

                _vessel.Start();
            }
            else
            {
                _vessel.Stop();
                //_viewModel.VesselStartStopButtonBackground = new SolidColorBrush(Colors.Green);
                //_viewModel.VesselStartStopButtonForeground = new SolidColorBrush(Colors.Wheat);
                //_viewModel.VesselStartStopButtonText = "Start";
            }
        }
예제 #2
0
 public void StopStep()
 {
     if (_run)
     {
         _run = false;
         _vessel?.Stop();
         _updateTimer.Stop();
         _updateTimer_Elapsed(this, null);
         _stepTimer.Stop();
     }
 }