public void ResumeVideo() { try { if (_statusVideo == StatusVideoEnum.Lunched) { _service.Play(); ComPrortSender.Send(_currentVideo.FileMotion, Terminal, App.Current, App.SendMessage, App.SendException); _timerEnd.Start(); } else { ComPortPackagesService.Resume(); _timerEnd.Start(); _service.Play(); VideoBanner.StartPlayer(); } Observer.StartObserv(); _statusVideo = StatusVideoEnum.Started; } catch (Exception ex) { App.SendException(ex); MessageBox.Show($"Video not runned please wait. | {ex.Message}"); } }
private void Btn_Start_Click(object sender, RoutedEventArgs e) { if (_statusVideo == StatusVideoEnum.Pause || _statusVideo == StatusVideoEnum.Lunched || _statusGame == StatusGameEnum.Lunched) { _watcher.Start(); Start(); Btn_Pause.IsEnabled = true; Btn_Start.IsEnabled = false; if (_typeItem != TypeItem.Game) { Observer.ObservIteration(); } SetObserverStart(); if (VideoBanner.VideoCollection != null) { VideoBanner.Visibility = Visibility.Visible; Btn_Play.Visibility = Visibility.Collapsed; PC_Bar.Visibility = Visibility.Collapsed; VideoBanner.StartPlayer(); } } else { //System.Windows.MessageBox.Show("Запустите видео или игру"); } }