public FormCalculateTrain() { InitializeComponent(); defence = new DoubleClickDefence(this.components); lblTestWord.Text = string.Empty; lblTestWord.Visible = false; lblCheckResult.Text = string.Empty; lblCheckResult.Visible = false; this.train = new TrainMachineCalculate(); this.train.TestType = TrainTypeCalculate.Multiplication; LoadFormConfiguration(); 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); }
public FormTrainCalculate() { InitializeComponent(); defence = new DoubleClickDefence(this.components); lblTestWord.Text = string.Empty; lblTestWord.Visible = false; lblCheckResult.Text = string.Empty; lblCheckResult.Visible = false; this.train = new TrainMachineCalculate(); chBVisionTime.Checked = train.IsHideQuestion; nUDVisibleTime.Value = train.TimeShowing; chBTimeForAnswer.Checked = train.IsAutoAnswer; nUDTimeForAnswer.Value = train.TimeForAnswer; rBAddition.Checked = train.TestType == TrainTypeCalculate.Addition; rbMultiplication.Checked = train.TestType == TrainTypeCalculate.Multiplication; rbSum.Checked = train.TestType == TrainTypeCalculate.Sum; nUDx1Left.Value = train.LeftMultiplyMin; nUDx1Right.Value = train.LeftMultiplyMax; nUDx2Left.Value = train.RightMultiplyMin; nUDx2Right.Value = train.RightMultiplyMax; nUDNumberCount.Value = train.SummandCount; chBAddMinus.Checked = train.WithNegativ; LoadFormConfiguration(); 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); }