/// <summary> /// The user selected an answer. /// Set the flags, menu entry colors, and start timer. /// </summary> private void AnswerSelected(bool correctAnswer, FlashCard selectedAnswer) { QuestionStateMachine.Done(); if (!AnswerChosen) { //set flags AnswerChosen = true; AnsweredCorrect = correctAnswer; //Set all the colors of the answers to let the user know which was the correct answer foreach (var entry in Entries) { entry.QuestionAnswered = true; } if (null != QuestionAnswered) { QuestionAnswered(this, new QuestionEventArgs(AnsweredCorrect, correctQuestion, selectedAnswer)); } //start the timer to exit this screen AutoQuit.Start(1f); if (null != OverlayScreen) { OverlayScreen.ExitScreen(); } } }
public override void ExitScreen() { base.ExitScreen(); if (null != OverlayScreen) { OverlayScreen.ExitScreen(); } }
public override void UnloadContent() { base.UnloadContent(); if (null != OverlayScreen) { OverlayScreen.ExitScreen(); } if (null != soundContent) { soundContent.Unload(); soundContent.Dispose(); soundContent = null; } }