Esempio n. 1
0
        private void timer2_Tick(object sender, EventArgs e)
        {
            int timer = Convert.ToInt32(label2.Text);

            timer       = timer - 1;
            label2.Text = Convert.ToString(timer);
            if (timer == 0)
            {
                timer2.Stop();
                if (MessageBox.Show("De tijd is om! wilt u het opnieuw proberen?", "Tijd is om!", MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button1) == DialogResult.No)
                {
                    Start_Menu form = new Start_Menu();
                    form.Show();
                    this.Hide();
                    //Application.Exit(); // or this.Close();
                }
                else
                {
                    Level4 form = new Level4();
                    form.Show();
                    this.Hide();
                    // timer4.Start();
                }
            }
        }
Esempio n. 2
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     int timer = Convert.ToInt32(label2.Text);
     timer = timer-1;
     label2.Text = Convert.ToString(timer);
     if(timer == 0)
     {
         timer2.Stop();
         if (MessageBox.Show("De tijd is om! wilt u het opnieuw proberen?", "Tijd is om!", MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button1) == DialogResult.No)
         {
             Start_Menu form = new Start_Menu();
             form.Show();
             this.Hide();
             //Application.Exit(); // or this.Close();
         }
         else
         {
             Level4 form = new Level4();
             form.Show();
             this.Hide();
             // timer4.Start();
         }
     }
 }