Beispiel #1
0
        public addQuestionUC(QuestionBlock question)
        {
            InitializeComponent();
            text    = question.Text;
            this.id = question.id;
            foreach (var item in question.Answers)
            {
                createAnswerUC uc1 = new createAnswerUC(item.IsCorrect, item.Text, item.id);
                uc1.delete  += refreshId;
                uc1.delete  += deleteAnswer;
                uc1.changed += RightAnswerSelected;

                answersPanel.Controls.Add(uc1);

                answerID++;
            }
            staticID++;
            setQuestionBlock();
        }
Beispiel #2
0
        public addQuestionUC()
        {
            InitializeComponent();
            createAnswerUC uc1 = new createAnswerUC(answerID++);
            createAnswerUC uc2 = new createAnswerUC(answerID++);

            uc1.delete += refreshId;
            uc1.delete += deleteAnswer;
            uc2.delete += deleteAnswer;
            uc2.delete += refreshId;

            uc1.right = true;

            uc1.changed += RightAnswerSelected;
            uc2.changed += RightAnswerSelected;

            answersPanel.Controls.Add(uc1);
            answersPanel.Controls.Add(uc2);

            id = staticID++;
            setQuestionBlock();
        }