private void btLv2_Click(object sender, EventArgs e) { Level2 f2 = new Level2(); this.Hide(); f2.ShowDialog(); this.Close(); }
private void bt_Replay_Click(object sender, EventArgs e) { this.Hide(); string level_restart = string.Empty; if (Variabile.nivel_actual == 1) { Level1 lv = new Level1(); lv.ShowDialog(); } else if (Variabile.nivel_actual == 2) { Level2 lv = new Level2(); lv.ShowDialog(); } else if (Variabile.nivel_actual == 3) { Level3 lv = new Level3(); lv.ShowDialog(); } else if (Variabile.nivel_actual == 4) { Level4 lv = new Level4(); lv.ShowDialog(); } else { Level5 lv = new Level5(); lv.ShowDialog(); } this.Close(); }
private void btReset_Click(object sender, EventArgs e) { timer1.Stop(); Level2 f2 = new Level2(); this.Hide(); f2.ShowDialog(); this.Close(); }
private void timer1_Tick(object sender, EventArgs e) { if (timeLeft > 0) { timeLeft = timeLeft - 1; lbTimpRamas.Text = timeLeft + ""; } else { timer1.Stop(); lbTimpRamas.Text = "0"; MessageBox.Show("Time is up, try again!"); Level2 f2 = new Level2(); this.Hide(); f2.ShowDialog(); this.Close(); } }