Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Button1_Click(object sender, EventArgs e)
- {
- DialogResult dialogResult = MessageBox.Show("Would you like to play again?", "No would result in the application closing"), MessageBoxButtons.YesNo;
- if (dialogResult == DialogResult.Yes)
- {
- Application.Exit();
- }
- else if (dialogResult == DialogResult.No)
- {
- MainWindow window1 = new MainWindow();
- window1.Show();
- this.Close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement