Ejemplo n.º 1
0
        private void timerMain_Tick(object sender, EventArgs e)
        {
            if (duration.TotalSeconds >= 0)
            {
                duration = duration.Subtract(new TimeSpan(0, 0, 1));
            }

            else
            {
                timerMain.Stop();
                //Form.ActiveForm.Close();
                exitCall();
                MessageBox.Show("Time's up.");
                FinalResult final = new FinalResult();
                final.Show();
                //Application.Exit();
            }
        }
Ejemplo n.º 2
0
        private void timerTwo_Tick(object sender, EventArgs e)
        {
            //if (Data.phase2Correct.Equals(check))
            if ((int)(Data.phase2Correct.Average()) == 1)
            {
                timerTwo.Stop();
                Welcome.activeSession.timerMain.Stop();
                //this.Close();
                Welcome.activeSession.exitCall();
            }

            if (Welcome.duration.TotalSeconds > 0)
            {
                labelTimer.Text = Welcome.duration.ToString();
                if (Data.phase2Correct[0] == 1)
                {
                    button1.Enabled   = false;
                    button1.BackColor = Color.FromArgb(18, 23, 26);
                }
                if (Data.phase2Correct[1] == 1)
                {
                    button2.Enabled   = false;
                    button2.BackColor = Color.FromArgb(18, 23, 26);
                }
                if (Data.phase2Correct[2] == 1)
                {
                    button3.Enabled   = false;
                    button3.BackColor = Color.FromArgb(18, 23, 26);
                }
            }
            else
            {
                //timerTwo.Stop();
                Welcome.activeSession.exitCall();
                MessageBox.Show("Time's up");
                FinalResult final = new FinalResult();
                final.Show();
            }
        }
Ejemplo n.º 3
0
        private void BreachTwo_FormClosing(object sender, FormClosingEventArgs e)
        {
            FinalResult scorecard = new FinalResult();

            scorecard.Show();
        }