Пример #1
0
        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
            Highscores h = new Highscores();

            h.Close();
        }
Пример #2
0
 public void restart()
 {
     timer1.Enabled = false;
     MessageBox.Show("Snake is dead. You scored: " + Globals.CurrentScore.ToString(), this.Text);
     if (Globals.CurrentScore >= 100)
     {
         if (MessageBox.Show("Would you like to submit your highscores?", this.Text, MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             Highscores h = new Highscores();
             h.Show();
             lblSnakeScore.Text = "0";
             spaceBarLabel.Text = "Press 'Enter' to Begin";
             snake = new Snake();
         }
         else
         {
             resetScore();
         }
     }
     else
     {
         resetScore();
     }
 }
Пример #3
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            Highscores h = new Highscores();

            h.Close();
        }
Пример #4
0
        private void highscoresToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Highscores h = new Highscores();

            h.Show();
        }