private void CheckForShortTimeSignal(Object source, ElapsedEventArgs e) { if (ShortTimeDetected != null && Flag.Message == false && Counter.shortTimeCount > Args.shortMilliseconds) { Counter.shortTimeCount = 0; Flag.MessageResult = MessageBoxResult.None; CorrectCount++; ShortTimeDetected("坐姿不端正哦,调整一下吧:)"); this.mainWindow.TimeLabel.Dispatcher.Invoke(new Action( delegate { mainWindow.CountLabel.Content = CorrectCount.ToString(); })); } }
private void DisplayScore() { CorrectAnswerCount.text = CorrectCount.ToString(); WrongAnswerCount.text = InCorrectCount.ToString(); }