示例#1
0
        public FormTrainDate()
        {
            InitializeComponent();

            defence = new DoubleClickDefence(this.components);

            this.train = new TrainMachineDate();

            chBVisionTime.Checked = train.IsHideQuestion;
            nUDVisibleTime.Value  = train.TimeShowing;

            chBTimeForAnswer.Checked = train.IsAutoAnswer;
            nUDTimeForAnswer.Value   = train.TimeForAnswer;

            rBDayOfWeek.Checked = train.TestType == TrainTypeDate.DayOfWeek;
            rBMonth.Checked     = train.TestType == TrainTypeDate.MonthDate;
            rBYear.Checked      = train.TestType == TrainTypeDate.IndexOfYear;
            rBYear12.Checked    = train.TestType == TrainTypeDate.IndexOf12;

            nUDLeft.Value  = train.MinYear;
            nUDRight.Value = train.MaxYear;

            LoadFormConfiguration();

            Common.SetTextBoxOnlyNumbers(tBTestWord);

            this.train.TrainStarted       += new EventHandler(train_TrainStarted);
            this.train.TrainQuestionHided += new EventHandler(train_TrainQuestionHided);
            this.train.TrainQuestionNew   += new EventHandler(train_TrainQuestionNew);

            this.train.TrainQuestionResult  += new QuestionResultEventHandler(train_TrainQuestionResult);
            this.train.TrainAnswerAutoCheck += new AutoCheckEventHandler(train_TrainAnswerAutoCheck);

            this.train.TrainStoped += new EventHandler(train_TrainStoped);
        }
示例#2
0
        public FormDateTrain()
        {
            InitializeComponent();

            defence = new DoubleClickDefence(this.components);

            this.train = new TrainMachineDate();

            this.train.TestType = TrainTypeDate.DayOfWeek;

            LoadFormConfiguration();

            Common.SetTextBoxOnlyNumbers(tBTestWord);

            this.train.TrainStarted       += new EventHandler(train_TrainStarted);
            this.train.TrainQuestionHided += new EventHandler(train_TrainQuestionHided);
            this.train.TrainQuestionNew   += new EventHandler(train_TrainQuestionNew);

            this.train.TrainQuestionResult  += new QuestionResultEventHandler(train_TrainQuestionResult);
            this.train.TrainAnswerAutoCheck += new AutoCheckEventHandler(train_TrainAnswerAutoCheck);

            this.train.TrainStoped += new EventHandler(train_TrainStoped);
        }