Beispiel #1
0
        // 转到相应的题目
        private void btnQuestion_Click(object sender, EventArgs e)
        {
            int questionIndex = Convert.ToInt32(((Button)sender).Tag);

            if (questionIndex < 15)
            {
                AnswerQuestionForm answerQuestionForm = new AnswerQuestionForm();
                answerQuestionForm.questionIndex = questionIndex;
                answerQuestionForm.MdiParent     = this.MdiParent;
                answerQuestionForm.Show();
            }
            else if (14 < questionIndex && questionIndex < 19)
            {
                fillblank fillblank = new fillblank();
                fillblank.questionIndex21 = questionIndex;
                fillblank.MdiParent       = this.MdiParent;
                fillblank.Show();
            }
            else
            {
                ShortAnswer shortanswer = new ShortAnswer();
                shortanswer.questionIndex31 = questionIndex;
                shortanswer.MdiParent       = this.MdiParent;
                shortanswer.Show();
            }
            this.Close();
        }
        private void btnNext_Click(object sender, EventArgs e)
        {
            QuizHelper.studentAnswers2[questionIndex2] = rdoOptionF.Text;
            rdoOptionF.Text = "";
            if (questionIndex2 < QuizHelper.selectedQuestionIds2.Length - 1)
            {
                questionIndex2++;

                GetQuestionDetails(); // 显示试题信息

                CheckBtnNext();       // 确定是否到了最后一题
            }
            else  // 否则,打开答题卡窗体
            {
                ShortAnswer shortanswer = new ShortAnswer();
                shortanswer.Show();
                this.Hide();
            }
        }