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();
        }
Beispiel #2
0
        // 单击“下一题”按钮时,为答案数组赋值,并显示下一题的信息
        private void btnNext_Click(object sender, EventArgs e)
        {
            // 如果没有到最后一题,就继续显示新题目信息
            if (questionIndex < QuizHelper.selectedQuestionIds.Length - 1)
            {
                questionIndex++;

                GetQuestionDetails(); // 显示试题信息
                CheckOption();        // 如果题目已经答过,让相应的选项选中
                CheckBtnNext();       // 确定是否到了最后一题
            }
            else  // 否则,开始简答题
            {
                fillblank fillblank = new fillblank();
                fillblank.Show();
                this.Hide();
            }
        }