public void LevelUpCheck() { if (Card1.Enabled == false && DubCard1.Enabled == false && Card2.Enabled == false && DubCard2.Enabled == false && Card3.Enabled == false && DubCard3.Enabled == false && Card4.Enabled == false && DubCard4.Enabled == false && Card5.Enabled == false && DubCard5.Enabled == false && Card6.Enabled == false && DubCard6.Enabled == false && Card7.Enabled == false && DubCard7.Enabled == false && Card8.Enabled == false && DubCard8.Enabled == false && Card9.Enabled == false && DubCard9.Enabled == false && Card10.Enabled == false && DubCard10.Enabled == false && Card11.Enabled == false && DubCard11.Enabled == false && Card12.Enabled == false && DubCard12.Enabled == false) { timer2.Stop(); levelUp.Play(); System.Windows.Forms.MessageBox.Show("Goed Gedaan het level is voltooid, je gaat nu naar het volgende level!"); Level2 form = new Level2(); form.Show(); this.Hide(); } else { } }
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 { Level2 form = new Level2(); form.Show(); this.Hide(); // timer4.Start(); } } }