예제 #1
0
파일: Question.cs 프로젝트: jocundmo/SRCBQS
 //public void FillAnswer(Answer.Symbol answerSym)
 //{
 //    FillAnswerCommand.Sym = answerSym;
 //    FillAnswerCommand.Do();
 //}
 public static Question MakeNew(int index, Typee questionType, string title, string subtitle, Questionnaire qn)
 {
     Question q = new Question();
     q.Index = index;
     q.Title = title;
     q.Subtitle = subtitle;
     q.QuestionType = questionType;
     q.AvailableAnswers = new AnswerList();
     q.SelectedAnswer = Answer.Empty;
     q.Questionnaire = qn;
     return q;
 }
예제 #2
0
파일: Question.cs 프로젝트: jocundmo/SRCBQS
 public Question MakeCopy(Questionnaire qn)
 {
     Question q = new Question();
     q.Index = this.Index;
     q.Title = this.Title;
     q.Subtitle = this.Subtitle;
     q.QuestionType = this.QuestionType;
     q.AvailableAnswers = this.AvailableAnswers.MakeCopy();
     q.SelectedAnswer = Answer.Empty;
     q.Questionnaire = qn;
     return q;
 }
예제 #3
0
 public FillAnswerCommand(Question parent)
 {
     this.Question = parent;
 }
예제 #4
0
파일: MainForm.cs 프로젝트: jocundmo/SRCBQS
 //private void PopulateQuestionnaireUI(Questionnaire qn)
 //{
 //    labelQuestionnaireName.Text = qn.Subject;
 //}
 private void PopulateQuestionUI(Question q)
 {
     labelQuestionnaireIndex.Text = string.Format("第 {0} 份", q.Questionnaire.Index);
     labelQuestionnaireName.Text = q.Questionnaire.Subject;
     //lblSelectedAnswer.Text = q.SelectedAnswer.FullText;
     this.richTxtQuestion.Text = q.Title + Environment.NewLine + q.Subtitle;
     this.comboBox1.Items.Clear();
     this.comboBox1.Enabled = true;
     this.comboBox1.DisplayMember = "FullText";
     this.comboBox1.ValueMember = "Sym";
     //this.comboBox1.DataSource = qn.Questions[0].AvailableAnswers;
     object[] list = new object[q.AvailableAnswers.Count];
     for (int i = 0; i < q.AvailableAnswers.Count; i++)
     {
         list[i] = q.AvailableAnswers[i];
     }
     //this.comboBox1.Items.Insert(0, Answer.Empty);
     this.comboBox1.Items.AddRange(list);
 }