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("Мачът не съществува!"); } }
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(); }
private void HWButton_Click(object sender, EventArgs e) { HWLabel.Show(); HWButton.Hide(); ExitButton.Show(); }