private void CurrentGame_Paused(object sender, EventArgs e) { if (_pauseDisplay == null) { _pauseDisplay = new PauseForm(CurrentGame); } _pauseDisplay.ShowDialog(CurrentGame); // Otherwise KeyDown (MainForm) wont trigger CurrentGame.Focus(); }
private void CurrentGame_Started(object sender, EventArgs e) { CloseUiForms(); // Show / Hide Buttons BtnNewGame.Visible = false; BtnRestartGame.Visible = true; // Otherwise KeyDown (MainForm) wont trigger CurrentGame.Focus(); }
private void CurrentGame_Over(object sender, EventArgs e) { if (_gameoverDisplay == null) { _gameoverDisplay = new GameOverForm(CurrentGame); } _gameoverDisplay.ShowDialog(CurrentGame); pointsValue.Text = "0"; // Otherwise KeyDown (MainForm) wont trigger CurrentGame.Focus(); }