private void timer3_Tick(object sender, EventArgs e) { if (n > 0) { n--; } else { timer2.Stop(); timer3.Stop(); MessageBox.Show("Time Out!"); n = 90; Tstate10 b = new Tstate10(); b.Show(); this.Hide(); } s4.Text = n.ToString(); }
private void timer2_Tick(object sender, EventArgs e) { if (meatbox9.Bounds.IntersectsWith(ik1.Bounds)) { meatbox9.Top = 25; meatbox9.Left = 25; } else if (meatbox9.Bounds.IntersectsWith(Goal10.Bounds)) { timer1.Stop(); timer2.Stop(); timer3.Stop(); MessageBox.Show("Next state !"); n = 91; meatbox9.Top = 25; meatbox9.Left = 25; Tstate10 a = new Tstate10(); a.Show(); this.Hide(); } }