private void BtnPause_Click(object sender, RoutedEventArgs e) { if (flagIsStarted) { ComPortPackagesService.Pause(); } }
public void PauseVideo() { if (_statusVideo == StatusVideoEnum.Started) { _service.Pause(); VideoBanner.PausePlayer(); ComPortPackagesService.Pause(); _timerEnd.Stop(); Thread.Sleep(300); _statusVideo = StatusVideoEnum.Pause; } else { MessageBox.Show("Видео не началось производиться"); } }