void train_TrainQuestionResult(object sender, QuestionResultEventArgs e) { tSSTestTimer.Stop(); tBTestWord.Text = string.Empty; lblTestWord.Visible = true; lblCheckResult.Visible = true; double time = tSSTestTimer.TimeInterval().TotalSeconds; string timeString = "\r\n" + time.ToString("F1") + " с" + (e.IsAutoCheck ? " Авто" : ""); lblTestWord.Text = e.Text; if (e.IsAnswerRight) { lblCheckResult.Text = "Правильно" + timeString; lblCheckResult.ForeColor = System.Drawing.Color.Green; } else { errorPictureBox.StartShowing(); lblCheckResult.Text = "Неправильно!!!" + timeString; lblCheckResult.ForeColor = System.Drawing.Color.Red; defence.StartLock(); } }
void train_TrainQuestionResult(object sender, QuestionResultEventArgs e) { tSSTestTimer.Stop(); tBTestWord.Text = string.Empty; lblCheckResult.Visible = true; double time = tSSTestTimer.TimeInterval().TotalSeconds; string timeString = "\r\n" + e.Text + "\r\n" + time.ToString("F1") + " с" + (e.IsAutoCheck ? " Авто" : ""); TextBox textBox = (TextBox)panelCalculationSeries.Controls[this.train.QuestionIndex]; textBox.Text = this.train.AnswerValue.ToString(); textBox.ForeColor = Color.Blue; if (e.IsAnswerRight) { lblCheckResult.Text = "Правильно" + timeString; lblCheckResult.ForeColor = System.Drawing.Color.Green; } else { errorPictureBox.StartShowing(); lblCheckResult.Text = "Неправильно!!!" + timeString; lblCheckResult.ForeColor = System.Drawing.Color.Red; defence.StartLock(); } }