예제 #1
0
        private void EndGame()
        {
            timerForBall.Stop();
            lblLives.Text  = string.Format("{0}", Scene.Lives);
            lblPoints.Text = string.Format("{0}", Scene.Points);
            lblTime.Text   = string.Format("{0:00}:{1:00}", seconds / 60, seconds % 60);
            Invalidate(true);
            Scene.EndGame(seconds);
            string    Name      = "";
            EnterName enterName = new EnterName();

            this.AddOwnedForm(enterName);
            if (enterName.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Name = enterName.PlayerName;
            }
            this.RemoveOwnedForm(enterName);
            Top5.Add(Name, Scene.Points);
            Top5.saveScores();
            this.Close();
        }
예제 #2
0
 public Form1()
 {
     InitializeComponent();
     Top5.startScores();
 }