Beispiel #1
0
        private void button10_Click(object sender, EventArgs e)
        {
            if (radioButton40.Checked)
            {
                iq += 8;
                q10 = true;
                a10 = radioButton40.Text;
            }
            else if (radioButton37.Checked)
            {
                a10 = radioButton37.Text;
            }
            else if (radioButton38.Checked)
            {
                a10 = radioButton38.Text;
            }
            else if (radioButton39.Checked)
            {
                a10 = radioButton39.Text;
            }


            timer1.Stop();
            string time = stopWatch.Elapsed.Minutes.ToString("00") + ":" +
                          stopWatch.Elapsed.Seconds.ToString("00");

            MessageBox.Show("Thank you, the test is finished!\n" + time);
            this.Close();
            answers ans = new answers();

            ans.Show();
        }
Beispiel #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (stopWatch.Elapsed.Minutes == 10)
            {
                timeup = false;

                this.Close();
                answers ans = new answers();
                ans.Show();
            }
            timer.Text = "Time Elapsed : " +
                         (9 - stopWatch.Elapsed.Minutes).ToString("00") + ":" +
                         (59 - stopWatch.Elapsed.Seconds).ToString("00");
        }