Example #1
0
        private void lbQues_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var      problem = listBox4.SelectedItem.ToString().Substring(1);
            Question ques    = RecordService.ShowQues(User, problem);

            MainWin.QuestionList = new List <Question>();
            MainWin.QuestionList.Add(ques);
            MainWin.QuesRecord           = new Record();
            MainWin.QuesRecord.Questions = MainWin.QuestionList;
            var study = new QuestionStudyControl(MainWin);

            this.MainWin.SubView.Controls.Clear();
            MainWin.SubView.Controls.Add(study);
        }
Example #2
0
        public void ExamMode()
        {
            //打开选择窗口
            var choose = new QuestionChooseForm();

            choose.listBox1.DataSource = Datas.QuesTitleList;
            choose.ShowDialog();

            //显示题目学习控件
            if (choose.DialogResult == DialogResult.OK)
            {
                this.SubView.Controls.Clear();
                QuestionList = DataProvider.GetQuestions(choose.choice);
                QuesRecord   = RecordService.QuestionLearning(User, QuestionList);
                var study = new QuestionStudyControl(this);
                this.SubView.Controls.Add(study);
            }
        }