コード例 #1
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("Запустите сначала игру");
            }
        }
コード例 #2
0
        public void LunchAndClickGame()
        {
            _gameProcessor.LaunchProcess();
            _gameProcessor.WaitForProgram();

            if (_gameProcessor.Game.TypeStartFocus == TypeStartFocus.FocusToMainWnd)
            {
                WinAPI.ShowWindow(WinAPI.FindWindow(null, _gameProcessor.NameProcess), 22);
                Thread.Sleep(3000);
            }

            MonitorManager.MoveWindow(_currentGame.NameProcess, App.Setting.NumberLeftMonitor);

            if (_gameProcessor.Game.TypeStartFocus == TypeStartFocus.FocusToMainWnd)
            {
                KeySimulationHelper.SwitchToMainWindow();
            }

            Btn_Start.IsEnabled = true;
            Observer.StartObserv();
            _statusGame = StatusGameEnum.Lunched;
        }