예제 #1
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;
        }