예제 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            int x = Int32.Parse(timeLabel.Text);

            if (x == 1)
            {
                timer1.Stop();

                timeLabel.Text = "0";

                MessageBox.Show("Times up!\nYour final point/s is " + points);

                progressReset();

                WindowStart windowStart = new WindowStart();
                this.Close();
                windowStart.Show();
            }
            x -= 1;

            timeLabel.Text = x + "";

            if (x <= 10)
            {
                timeLabel.ForeColor = System.Drawing.Color.Red;
            }
            else
            {
                timeLabel.ForeColor = System.Drawing.Color.PaleGreen;
            }
        }
예제 #2
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            WindowStart windowStart = new WindowStart();

            this.Close();
            windowStart.Show();
        }