public override Dictionary <string, object> SaveToDict()
        {
            var dict = new Dictionary <string, object>();

            dict.Add(GDMConstants.SchemaKey, "Arkusz1");

            dict.Merge(true, Question.ToGDEDict(QuestionKey));
            dict.Merge(true, AnswerA.ToGDEDict(AnswerAKey));
            dict.Merge(true, AnswerB.ToGDEDict(AnswerBKey));
            dict.Merge(true, AnswerC.ToGDEDict(AnswerCKey));
            dict.Merge(true, AnswerD.ToGDEDict(AnswerDKey));
            dict.Merge(true, CorrectAns.ToGDEDict(CorrectAnsKey));
            return(dict);
        }
示例#2
0
        public override Dictionary <string, object> SaveToDict()
        {
            var dict = new Dictionary <string, object>();

            dict.Add(GDMConstants.SchemaKey, "Missions");

            dict.Merge(true, FirstCard.ToGDEDict(FirstCardKey));
            dict.Merge(true, Fight.ToGDEDict(FightKey));
            dict.Merge(true, MissionLevel.ToGDEDict(MissionLevelKey));
            dict.Merge(true, MissionName.ToGDEDict(MissionNameKey));
            dict.Merge(true, MissionDescription.ToGDEDict(MissionDescriptionKey));
            dict.Merge(true, NextCard.ToGDEDict(NextCardKey));
            dict.Merge(true, AnswerA.ToGDEDict(AnswerAKey));
            dict.Merge(true, AnswerB.ToGDEDict(AnswerBKey));
            dict.Merge(true, AnswerC.ToGDEDict(AnswerCKey));
            dict.Merge(true, AnswerD.ToGDEDict(AnswerDKey));
            return(dict);
        }
示例#3
0
        private void CheckSignal_Tick(object sender, EventArgs e)
        {
            messages.Receive(usedPort);

            switch (messages.extractedData)
            {
            case "A":
                AnswerA.PerformClick();
                break;

            case "B":
                AnswerB.PerformClick();
                break;

            case "C":
                AnswerC.PerformClick();
                break;

            case "D":
                AnswerD.PerformClick();
                break;

            case "1":
                ModeStam.PerformClick();
                break;

            case "2":
                ModeSpelling.PerformClick();
                break;

            case "3":
                ModeSubject.PerformClick();
                break;

            case "4":
                StartTest.PerformClick();
                break;
            }


            /*   if (messages.extractedData == "A")
             * {
             *     AnswerA.PerformClick();
             * }
             *
             * if (messages.extractedData == "B")
             * {
             *     AnswerB.PerformClick();
             * }
             *
             * if (messages.extractedData == "C")
             * {
             *     AnswerC.PerformClick();
             * }
             *
             * if (messages.extractedData == "D")
             * {
             *     AnswerD.PerformClick();
             * }
             *
             * if (messages.extractedData == "1")
             * {
             *     ModeStam.PerformClick();
             * }
             *
             * if (messages.extractedData == "2")
             * {
             *     ModeSpelling.PerformClick();
             * }
             *
             * if (messages.extractedData == "3")
             * {
             *     ModeSubject.PerformClick();
             * }
             *
             * if (messages.extractedData == "4")
             * {
             *     StartTest.PerformClick();
             * } */

            messages.clearIncomingData();
            if (score == -1)
            {
                score = 0;
            }
        }