Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication3
- {
- public partial class Form9 : Form
- {
- public Form9()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- this.Visible = true;
- Form2 form2 = new Form2();
- DialogResult dialog = MessageBox.Show("Answer is not correct! Do you want to play again?", "Quiz", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
- if (dialog == DialogResult.Yes)
- {
- this.Visible = false;
- form2.Show();
- }
- else if (dialog == DialogResult.No)
- {
- //e.Cancel = true;
- Application.Exit();
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- this.Visible = true;
- Form2 form2 = new Form2();
- DialogResult dialog = MessageBox.Show("Answer is not correct! Do you want to play again?", "Quiz", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
- if (dialog == DialogResult.Yes)
- {
- this.Visible = false;
- form2.Show();
- }
- else if (dialog == DialogResult.No)
- {
- //e.Cancel = true;
- Application.Exit();
- }
- }
- private void button3_Click(object sender, EventArgs e)
- {
- this.Visible = true;
- Form2 form2 = new Form2();
- DialogResult dialog = MessageBox.Show("Answer is not correct! Do you want to play again?", "Quiz", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
- if (dialog == DialogResult.Yes)
- {
- this.Visible = false;
- form2.Show();
- }
- else if (dialog == DialogResult.No)
- {
- //e.Cancel = true;
- Application.Exit();
- }
- }
- private void button4_Click(object sender, EventArgs e)
- {
- this.Visible = false;
- Form10 form10 = new Form10();
- form10.Show();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement