private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); Highscores h = new Highscores(); h.Close(); }
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(); } }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Highscores h = new Highscores(); h.Close(); }
private void highscoresToolStripMenuItem_Click(object sender, EventArgs e) { Highscores h = new Highscores(); h.Show(); }