Exemplo n.º 1
0
        private void button15_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("确定交卷吗", "操作提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                QuestionResultForm questionresultform = new QuestionResultForm();
                questionresultform.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("真想放弃吗", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (result == DialogResult.OK)
            {
                //  this.Close();
                QuestionResultForm f = new QuestionResultForm();
                f.Show();
            }
        }
Exemplo n.º 3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            int minute; //分钟
            int second; //秒

            if (QuizHelper.remainSeconds > 0)
            {
                QuizHelper.remainSeconds--;
                minute      = QuizHelper.remainSeconds / 60;
                second      = QuizHelper.remainSeconds % 60;
                label1.Text = string.Format("{0:00}:{1:00}", minute, second);
            }
            else
            {
                // timer1.Enabled = false;
                timer1.Stop();
                MessageBox.Show("时间到了,该交卷了", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                QuestionResultForm questionresultForm = new QuestionResultForm();
                questionresultForm.MdiParent = this.MdiParent;
                questionresultForm.Show();
                this.Close();
            }
        }