Exemple #1
0
 internal void addQuestion(Question newQuestion, bool lineUp)
 {
     this.lineUpQuestions = lineUp;
     QuestionUI newQuestionUI = new QuestionUI(newQuestion);
     questionsUIList.Add(newQuestionUI);
     pnlControls.Controls.Add(newQuestionUI.Label);
     pnlControls.Controls.Add(newQuestionUI.TextBox);
     newQuestionUI.TextBox.KeyUp += textbox_KeyUp;
     newQuestionUI.Label.SendToBack();
 }
Exemple #2
0
 /// <summary>
 /// Add a Question into the TextFormStep
 /// </summary>
 /// <param name="textQuestion">The question of the text</param>
 /// <param name="answer">A default or previously-provided answer</param>
 /// <returns></returns>
 public Question AddQuestion(string textQuestion, string answer)
 {
     var result = new Question(textQuestion);
     result.Answer = answer;
     registerQuestion(result);
     return result;
 }
Exemple #3
0
 /// <summary>
 /// Add a Question into the TextFormStep
 /// </summary>
 /// <param name="textQuestion"></param>
 public Question AddQuestion(string textQuestion)
 {
     var newQuestion = new Question(textQuestion);
     registerQuestion(newQuestion);
     return newQuestion;
 }
Exemple #4
0
 /// <summary>
 /// Adds a new question to the UI, question list.
 /// Must be called for every question added in any way.
 /// </summary>
 private void registerQuestion(Question q)
 {
     questions.Add(q);
     ui.addQuestion(q, this.LineUpQuestions);
 }
Exemple #5
0
 /// <summary>
 /// Adds a new question to the UI, question list.
 /// Must be called for every question added in any way.
 /// </summary>
 private void registerQuestion(Question q)
 {
     questions.Add(q);
     ui.addQuestion(q, this.LineUpQuestions);
 }
Exemple #6
0
 internal QuestionUI(Question question)
 {
     this.Label = new Label();
     this.Label.AutoSize = false;
     this.Label.Text = question.QuestionText;
     Label.AutoEllipsis = true;
     this.TextBox = new TextBox();
     this.TextBox.Text = question.Answer;
     this.QuestionInfo = question;
 }