public QuizResult(QuizMain.Result result) { InitializeComponent(); m_result = result; int hour = (int)result.costTime.TotalHours; int minute = ((int)result.costTime.TotalSeconds - hour * 3600) / 60; int second = (int)result.costTime.TotalSeconds - minute * 60 - hour * 3600; // format result text this.resultText.Text = "CorrectRate: " + 100 * result.CorrectRate + "%\r\n" + "TotalTime: " + hour.ToString() + ":" + minute.ToString() + ":" + second.ToString(); this.resultText.Text += "\r\n\r\n"; this.resultText.Text += FormatResultDetailText(); this.resultText.DeselectAll(); this.resultText.SelectedText = ""; this.overBtn.Focus(); }
public QuizResult( QuizMain.Result result ) { InitializeComponent(); m_result = result; int hour = (int)result.costTime.TotalHours; int minute = ((int)result.costTime.TotalSeconds - hour * 3600) / 60; int second = (int)result.costTime.TotalSeconds - minute * 60 - hour * 3600; // format result text this.resultText.Text = "CorrectRate: " + 100 * result.CorrectRate + "%\r\n" + "TotalTime: " + hour.ToString() + ":" + minute.ToString() + ":" + second.ToString(); this.resultText.Text += "\r\n\r\n"; this.resultText.Text += FormatResultDetailText(); this.resultText.DeselectAll(); this.resultText.SelectedText = ""; this.overBtn.Focus(); }