Exemple #1
0
        private void DoTestInit()
        {
            running  = true;
            nowacnum = 0;
            nowwanum = 0;
            nownum   = 0;
            nowtime  = 0;
            tmaxtime = paddingInfo.maxTime;

            ResaultPanel.Visibility = Visibility.Collapsed;

            AcStory = Resources["ACStory"] as Storyboard;
            WaStory = Resources["WAStory"] as Storyboard;


            try {
                waques           = new List <IQuestionAble>();
                nowques          = paddingInfo.creater.Creater.NextQuestion();
                labQuestion.Text = nowques.Description;
                txtAnswer.Text   = "";
                labTestName.Text = paddingInfo.testName;

                FreshFlags();
                Timekeep();
            }
            catch (Exception ex) {
                Debug.WriteLine(ex.Message);
            }
        }
Exemple #2
0
        /// <summary>
        /// 判定
        /// </summary>
        public void Judge()
        {
            string        ure = txtAnswer.Text;
            CheckResaults cre = nowques.Check(ure);

            nownum++;
            if (cre.resault == CheckResaultEnum.Accept)
            {
                JudgeAccept();
            }
            else
            {
                JudgeError();
            }
            if (running)
            {
                FreshFlags();
                nowques          = paddingInfo.creater.Creater.NextQuestion();
                labQuestion.Text = nowques.Description;
                txtAnswer.Text   = "";
            }
        }