private void Game_GameOver(Object sender, HorseEventArgs e) { foreach (Button b in _buttonGrid) { b.Enabled = false; } _timer.Stop(); MessageBox.Show("Gratulálok, győztél!" + Environment.NewLine + "Összesen " + e.Score + " pontot szereztél! ", "Bejárás huszárral", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); SetGame(_model.Size); SetTimer(); }
private void Game_StepBack(Object sender, HorseEventArgs e) { _buttonGrid[e.BackX, e.BackY].BackColor = (e.BackX + e.BackY) % 2 == 0 ? Color.White : Color.Black; }
private void Game_GameAdvanced(Object sender, HorseEventArgs e) { TimeLabel.Text = TimeSpan.FromSeconds(e.GameTime).ToString("g"); // "g" <= format string }
private void Game_StepReload(Object sender, HorseEventArgs e) { _buttonGrid[e.LastX, e.LastY].BackColor = (e.LastX + e.LastY) % 2 == 0 ? Color.LightBlue : Color.Navy; _buttonGrid[e.X, e.Y].BackColor = Color.Yellow; Score.Text = _model.Score.ToString(); }