public void CTRLP() { if (isPaused == false) { TTimeLeft.Stop(); MessageBox.Show("Now the game is paused", "PAUSE", MessageBoxButtons.OK); play.Stop(); } }
/////////////////// TIME COUNTING ////////////////////// public void goingtime() { if (timeLeft > 0) { // Display the new time left // by updating the Time Left label. timeLeft = timeLeft - 1; timeLabel.Text = timeLeft + " seconds"; } else { // If the user ran out of time, stop the timer, show // a MessageBox, and fill in the answers. TTimeLeft.Stop(); MessageBox.Show("The time ran out!", "STOP!"); timeLabel.Text = ""; catcher = Convert.ToInt32(LScore.Text); EndGame(); } }