public void OnNavigatedTo(NavigationContext navigationContext) { var opeType = navigationContext.Parameters["OperatorType"]; if (opeType != null) { m_BinaryOperationType = (BinaryOperationType)opeType; } var limitTime = navigationContext.Parameters["LimitationTime"]; if (limitTime != null) { if ((int)limitTime == -1) { // 無制限モード } else { // 制限時間付きモード m_RemainingTime = new TimeSpan(0, 0, 0, (int)limitTime); StartMainTimer(); } } var questionType = navigationContext.Parameters["QuestionType"]; if (questionType != null) { var questionTypeVal = (QuestionType)questionType; questionGenerator = new MathQuestionGenerator(questionTypeVal); (m_FirstValue, m_SecondValue) = questionGenerator.UpdateQuestion(); } }
private void ExcecuteCalc() { if (m_Answer == null) { return; } if (questionGenerator.CheckAnswer(m_FirstValue, m_SecondValue, m_Answer)) { //// せいかい m_Point++; //m_LatestStatus = "◎"; //PlusCorrectAnswerCount(); //UpdateScoresForDisplay(); //if (m_Points % 10 == 0) //{ // PlaySounds(K_PIPO2); //} //else //{ // PlaySounds(K_PIPO); //} (m_FirstValue, m_SecondValue) = questionGenerator.UpdateQuestion(); //SpeechProblem(); } else { //// まちがい m_Point--; //m_LatestStatus = "X"; //PlusIncorrectAnswerCount(); //UpdateScoresForDisplay(); //PlaySounds(K_BOO); } m_Answer = null; }