Esempio n. 1
0
        private void addTabcontrol7(Trail trail)
        {
            Learning learning = new Learning();
            Judgment judgment = new Judgment();
            Match match = new Match();
            Choice choice = new Choice();
            Puzzle puzzle = new Puzzle();
            if (!this.tabcontrol7learnQuestionType.Text.Equals("不存在"))
            {
                learning.ExciseName = this.tabcontrol7LearnExciseName.Text;
                learning.QuestionType = this.tabcontrol7learnQuestionType.Text;
                learning.Question = new ImageItem();
                learning.Question.Image = this.tabcontrol7LearnImage.Text;
                learning.Speech = this.tabcontrol0learnSound.Text;
                learning.Question.SpeechText = this.tabcontr0LearnKeyText.Text;
                learning.Question.Text = this.tabcontr0LearnKeyText.Text;

                learning.PinYing = this.tabcontrol7LearnPy.Text;
                 trail.Questions.Add(learning);
                // MessageBox.Show(strSerializeJSON);

            }
            else if (!this.tabcontrol7JudgeQuestionType.Text.Equals("不存在"))
            {
                judgment.ExciseName = this.tabcontrol7JudgeExciseName.Text;
                judgment.Speech = this.tabcontrol7JudgeSound.Text;
                judgment.QuestionType = this.tabcontrol7JudgeQuestionType.Text;
                judgment.Question = new ImageItem();

                judgment.Question.Image = this.tabcontrol7JudgeRightImage.Text;

                judgment.Distractor = new ImageItem();
                judgment.Distractor.Image = this.tabcontrol7JudgeWrongImage.Text;

                 trail.Questions.Add(judgment);

                //  MessageBox.Show(judgeSerializeJSON);

            }
            else if (!this.tabcontrol7MatchQuestionType.Text.Equals("不存在"))
            {
                match.ExciseName = this.tabcontrol7MatchExciseName.Text;
                match.QuestionType = this.tabcontrol7MatchQuestionType.Text;
                match.Speech = this.tabcontrol7MatchSound.Text;
                match.Question = new ImageItem();
                match.Question.Image = this.tabcontrol7MatchQuestionImage.Text;
                match.Answer = new ImageItem();
                match.Answer.Image = this.tabcontrol7MatchAnswerImage.Text;
                match.Distractor = new ImageItem();
                match.Distractor.Image = this.tabcontrol7MatchDistraImage.Text;
                trail.Questions.Add(match);

                //   MessageBox.Show(matchSerializeJSON);

            }
            else if (!this.tabcontrol7ChoiceQuestionType.Text.Equals("不存在"))
            {
                choice.ExciseName = this.tabcontrol7ChoiceExciseName.Text;
                choice.QuestionType = this.tabcontrol7ChoiceQuestionType.Text;
                choice.Speech = this.tabcontrol7ChoiceSound.Text;
                choice.Answer = new ImageItem();
                choice.Answer.Image = this.tabcontrol7ChoiceRightImage.Text;
                choice.Answer.SpeechText = this.tabcontrol7ChoiceRightText.Text;
                choice.Distractor = new ImageItem();
                choice.Distractor.Image = this.tabcontrol7ChoiceDistraImage.Text;
                choice.Distractor.SpeechText = this.tabcontrol7ChoiceDistraText.Text;

               trail.Questions.Add(choice);

            }
            else if (!this.tabcontrol7PuzzleQuestionType.Text.Equals("不存在"))
            {
                puzzle.ExciseName = this.tabcontrol7PuzzleExciseName.Text;
                puzzle.Speech = this.tabcontrol7PuzzleSound.Text;
                puzzle.QuestionType = this.tabcontrol7PuzzleQuestionType.Text;
                puzzle.PuzzleImage = new ImageItem();
                puzzle.PuzzleImage.Image = this.tabcontrol7PuzzleRightImage.Text;
                puzzle.Distractor = new ImageItem();
                puzzle.Distractor.Image = this.tabcontrol7PuzzleDistraImage.Text;

                trail.Questions.Add(puzzle);

                // MessageBox.Show(puzzleSerializeJSON);

            }
        }
Esempio n. 2
0
        private void showJudge(int i, Judgment judgment)
        {
            switch (i)
            {
                case 0:
                    this.tabControl0.SelectedIndex = 1;
                    this.tabcontrol0JudgeExciseName.Text=judgment.ExciseName ;
                    this.tabcontro0JudgeSound.Text= judgment.Speech ;
                    this.tabcontrol0JudgeQuestionType.Text =judgment.QuestionType ;
                    this.tabcontrol0JudgeRightImage.Text=judgment.Question.Image  ;
                    this.tabcontrol0JudgeWrongImage.Text=judgment.Distractor.Image;
                    break;
                case 1:
                    this.tabControl1.SelectedIndex = 1;
                    this.tabcontrol1JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol1JudgeSound.Text = judgment.Speech;
                    this.tabcontrol1JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol1JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol1JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 2:
                    this.tabControl2.SelectedIndex = 1;
                    this.tabcontrol2JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol2JudgeSound.Text = judgment.Speech;
                    this.tabcontrol2JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol2JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol2JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 3:
                    this.tabControl3.SelectedIndex = 1;
                    this.tabcontrol3JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol3JudgeSound.Text = judgment.Speech;
                    this.tabcontrol3JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol3JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol3JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 4:
                    this.tabControl4.SelectedIndex = 1;
                    this.tabcontrol4JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol4JudgeSound.Text = judgment.Speech;
                    this.tabcontrol4JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol4JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol4JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 5:
                    this.tabControl5.SelectedIndex = 1;
                    this.tabcontrol5JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol5JudgeSound.Text = judgment.Speech;
                    this.tabcontrol5JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol5JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol5JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 6:
                    this.tabControl6.SelectedIndex = 1;
                    this.tabcontrol6JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol6JudgeSound.Text = judgment.Speech;
                    this.tabcontrol6JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol6JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol6JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 7:
                    this.tabControl7.SelectedIndex = 1;
                    this.tabcontrol7JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol7JudgeSound.Text = judgment.Speech;
                    this.tabcontrol7JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol7JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol7JudgeWrongImage.Text = judgment.Distractor.Image;

                    break;
                case 8:
                    this.tabControl8.SelectedIndex = 1;
                    this.tabcontrol8JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol8JudgeSound.Text = judgment.Speech;
                    this.tabcontrol8JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol8JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol8JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 9:
                    this.tabControl9.SelectedIndex = 1;
                    this.tabcontrol9JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol9JudgeSound.Text = judgment.Speech;
                    this.tabcontrol9JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol9JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol9JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 10:
                    this.tabControl10.SelectedIndex = 1;
                    this.tabcontrol10JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol10JudgeSound.Text = judgment.Speech;
                    this.tabcontrol10JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol10JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol10JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 11:
                    this.tabControl11.SelectedIndex = 1;
                    this.tabcontrol11JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol11JudgeSound.Text = judgment.Speech;
                    this.tabcontrol11JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol11JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol11JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;
                case 12:
                    this.tabControl12.SelectedIndex = 1;
                    this.tabcontrol12JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol12JudgeSound.Text = judgment.Speech;
                    this.tabcontrol12JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol12JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol12JudgeWrongImage.Text = judgment.Distractor.Image;

                    break;
                case 13:
                    this.tabControl13.SelectedIndex = 1;
                    this.tabcontrol13JudgeExciseName.Text = judgment.ExciseName;
                    this.tabcontrol13JudgeSound.Text = judgment.Speech;
                    this.tabcontrol13JudgeQuestionType.Text = judgment.QuestionType;
                    this.tabcontrol13JudgeRightImage.Text = judgment.Question.Image;
                    this.tabcontrol13JudgeWrongImage.Text = judgment.Distractor.Image;
                    break;

            }
        }