Ejemplo n.º 1
0
 public void AddExtraQuestion(string question)
 {
     var eq = AskItem("AskExtraQuestions") as AskExtraQuestions;
     if (eq == null)
     {
         eq = new AskExtraQuestions();
         AskItems.Add(eq);
     }
     var q = eq.list.SingleOrDefault(vv => vv.Question == question);
     if (q != null)
         return;
     q = new AskExtraQuestions.ExtraQuestion() { Question = question };
     eq.list.Add(q);
 }
Ejemplo n.º 2
0
 public void AddTextQuestion(string question)
 {
     var tx = AskItem("AskText") as AskText;
     if (tx == null)
     {
         tx = new AskText();
         AskItems.Add(tx);
     }
     var q = tx.list.SingleOrDefault(vv => vv.Question == question);
     if (q != null)
         return;
     q = new AskExtraQuestions.ExtraQuestion() { Question = question };
     tx.list.Add(q);
 }
Ejemplo n.º 3
0
		public AskExtraQuestions ParseAskExtraQuestions()
		{
			var eq = new AskExtraQuestions();
			lineno++;
			if (curr.indent == 0)
				return eq;
			var startindent = curr.indent;
			while (curr.indent == startindent)
			{
				if (curr.kw != Parser.RegKeywords.None)
					throw GetException("unexpected line");
				var q = new AskExtraQuestions.ExtraQuestion { Question = GetLine() };
				eq.list.Add(q);
			}
			return eq;
		}
Ejemplo n.º 4
0
        public void AddExtraQuestion(string question)
        {
            var eq = AskItem("AskExtraQuestions") as AskExtraQuestions;

            if (eq == null)
            {
                eq = new AskExtraQuestions();
                AskItems.Add(eq);
            }
            var q = eq.list.SingleOrDefault(vv => vv.Question == question);

            if (q != null)
            {
                return;
            }
            q = new AskExtraQuestions.ExtraQuestion()
            {
                Question = question
            };
            eq.list.Add(q);
        }
Ejemplo n.º 5
0
        public void AddTextQuestion(string question)
        {
            var tx = AskItem("AskText") as AskText;

            if (tx == null)
            {
                tx = new AskText();
                AskItems.Add(tx);
            }
            var q = tx.list.SingleOrDefault(vv => vv.Question == question);

            if (q != null)
            {
                return;
            }
            q = new AskExtraQuestions.ExtraQuestion()
            {
                Question = question
            };
            tx.list.Add(q);
        }