Example #1
0
        private void State4_Grup1Button_Click(object sender, EventArgs e)
        {
            try
            {
                PongGameField name = new PongGameField(tournament.Rounds[4][0]);
                name.CurrentMatch.WinEvent += (s, a) => { ((Button)sender).Enabled = false; ShowInTaskbar = true; Show(); }; ShowInTaskbar = false; Hide();
                name.Show();
                name.CurrentMatch.WinEvent += (s, a) =>
                {
                    if (a.Winner.ID == name.CurrentMatch.PlayerOne.ID)
                    {
                        State4_P1.BackColor = Color.Gold;
                        State4_P2.BackColor = Color.Silver;
                    }
                    else if (name.CurrentMatch.WinnerID == name.CurrentMatch.PlayerTwo.ID)
                    {
                        State4_P1.BackColor = Color.Silver;
                        State4_P2.BackColor = Color.Gold;
                    }

                    ExitButton.Show();
                };
            }
            catch
            {
                MessageBox.Show("Мачът не съществува!");
            }
        }
Example #2
0
 public void GameOver(int points) //вывод результатов игры
 {
     m_gameMusic.Stop();
     m_endMusic.PlayLooping();
     GameOverLabel.Show();
     RetryButton.Show();
     ExitButton.Show();
     MartianBattleLabel.Show();
     PointsLabel.Text = "POINTS: " + points.ToString();
     PointsLabel.Show();
 }
Example #3
0
 private void HWButton_Click(object sender, EventArgs e)
 {
     HWLabel.Show();
     HWButton.Hide();
     ExitButton.Show();
 }