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"; } }
public void StopStep() { if (_run) { _run = false; _vessel?.Stop(); _updateTimer.Stop(); _updateTimer_Elapsed(this, null); _stepTimer.Stop(); } }