public override bool Equals(object obj)
        {
            if (obj == null || obj.GetType() != typeof(QuestionEventArgs))
            {
                return(false);
            }

            QuestionEventArgs other = (QuestionEventArgs)obj;

            return(QuestionID.Equals(other.QuestionID));
        }
Beispiel #2
0
        public void DisplayReport(ReportInstance report)
        {
            Questions = report.Questions;
            if (Dictionary != null)
            {
                Dictionary.Clear();
            }
            else
            {
                Dictionary = new Dictionary <QuestionID, Question>();
            }
            foreach (var quest in Questions)
            {
                Dictionary.Add(quest.ID, quest);
            }

            m_isReportingMode = true;
            QuestionID startingID = 0;

            switch (report.SectionType)
            {
            case SectionType.One:
                startingID = 0;
                break;

            case SectionType.Two:
                startingID = QuestionID.HowUDoin;
                break;

            case SectionType.Three:
                startingID = QuestionID.EnjoyableExercise;
                break;

            default:
                break;
            }
            SetCurrentQuestion(startingID, !m_isReportingMode);
        }
Beispiel #3
0
        public void SetCurrentQuestion(QuestionID _questionID, bool allowEdit)
        {
            m_exitQuizButton.gameObject.SetActive(true);
            ShowNextArrow(_questionID != QuestionID.GoalFromExercicePlan &&
                          _questionID != QuestionID.WorkoutDuration &&
                          (_questionID != QuestionID.HowIsBodyPartFeelin) /*Add Later the end questionIDs of every section*/);
            ShowPreviousArrow(_questionID != QuestionID.Gender &&
                              _questionID != QuestionID.EnjoyableExercise &&
                              _questionID != QuestionID.HowUDoin /*Add Later the starting questionIDs of every section*/);
            ShowEndOfSectionOne_ButtonNavigation(allowEdit &&
                                                 _questionID == QuestionID.GoalFromExercicePlan);
            //ShowStoreSectionTwoButton(allowEdit &&  Dictionary.ContainsKey(QuestionID.HowUDoin) /*Which means we're in section 2*/
            //    &&
            //        ( (Dictionary[QuestionID.AnyNewPain].SelectedResponse ==0 && _questionID== QuestionID.HowIsBodyPartFeelin)
            //          || (Dictionary[QuestionID.AnyProblems].SelectedResponse == 0 && _questionID==QuestionID.SayTheMatter && Dictionary[QuestionID.AnyNewPain].SelectedResponse != 0)
            //          || (Dictionary[QuestionID.AnyProblems].SelectedResponse != 0 && _questionID == QuestionID.)
            ShowStoreSectionThreeButton(allowEdit && _questionID == QuestionID.WorkoutDuration);

            m_currentQuestionID = _questionID;
            DisplayQuestion(Dictionary[_questionID], allowEdit);
            EnableRecordingAnswer(Dictionary[_questionID].IsFreestyle);
            EnableSlider(Dictionary[_questionID]);
        }
Beispiel #4
0
        public void InitializeQuestions(SectionType sectionType)
        {
            QuestionID startingID = 0;

            Dictionary = new Dictionary <QuestionID, Question>();
            switch (sectionType)
            {
            case SectionType.One:
                Questions  = GenerateSectionOneQuestions();
                startingID = 0;
                break;

            case SectionType.Two:
                startingID = QuestionID.HowUDoin;
                Questions  = GenerateSectionTwoQuestions();
                ShowStoreSectionTwoButton(true);
                break;

            case SectionType.Three:
                startingID = QuestionID.EnjoyableExercise;
                Questions  = GenerateSectionThreeQuestions();
                break;

            default:
                break;
            }
            if (Dictionary != null)
            {
                Dictionary.Clear();
            }
            foreach (var quest in Questions)
            {
                Dictionary.Add(quest.ID, quest);
            }
            m_isReportingMode = false;
            SetCurrentQuestion(startingID, !m_isReportingMode);
        }
Beispiel #5
0
 /*
  *  Function Name: ToString()
  *  Description:
  *      Return the string value of the "Row" which are the values EncID, ID,
  *      QuestionID, Text, and NextEID concantenated
  *
  *  Params:     None
  *  Returns:    -> string
  */
 public override string ToString()
 {
     return(EncID.ToString() + "\t" + ID.ToString() + "\t" + QuestionID.ToString()
            + "\t" + Text + "\t" + NextEID.ToString());
 }