Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 private void Game_StepBack(Object sender, HorseEventArgs e)
 {
     _buttonGrid[e.BackX, e.BackY].BackColor = (e.BackX + e.BackY) % 2 == 0 ? Color.White : Color.Black;
 }
Esempio n. 3
0
 private void Game_GameAdvanced(Object sender, HorseEventArgs e)
 {
     TimeLabel.Text = TimeSpan.FromSeconds(e.GameTime).ToString("g"); // "g" <= format string
 }
Esempio n. 4
0
 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();
 }