コード例 #1
0
        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}");
            }
        }
コード例 #2
0
 private void startSend_Click(object sender, RoutedEventArgs e)
 {
     if (!flagIsStarted)
     {
         OpenFileDialog dialog = new OpenFileDialog();
         if (dialog.ShowDialog() == true)
         {
             ComPrortSender.Send(dialog.FileName, Terminal, App.Current, App.SendMessage, App.SendException);
         }
         flagIsStarted = true;
     }
 }
コード例 #3
0
        public void StartGame()
        {
            if (_statusGame == StatusGameEnum.Lunched)
            {
                KeySimulationHelper.Simulation(_gameProcessor);
                ComPrortSender.Send(_currentGame.FileMotion, Terminal, App.Current, App.SendMessage, App.SendException);

                _timerEnd.Start();

                if (_gameProcessor.Game.ShiftPressTime != null)
                {
                    _timerShift.Start();
                }
                _statusGame = StatusGameEnum.Started;
            }
            else
            {
                MessageBox.Show("Запустите сначала игру");
            }
        }