private void TBox_AddingKey_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Back) { return; } TBox_AddingKey.Text = string.Empty; Key key = e.Key; TBox_AddingKey.Text = KeySimulationHelper.GetStringButton(key); _additionalKeyPressed = e.Key; }
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("Запустите сначала игру"); } }
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; }
private void ExecuteShiftClick() { KeySimulationHelper.ShiftClick(_gameProcessor); }