示例#1
0
	    public new static AskText ReadXml(XElement e)
	    {
	        var t = new AskText();
            foreach(var ee in e.Elements("Question"))
                t.list.Add(AskExtraQuestions.ExtraQuestion.ReadXml(ee));
	        return t;
	    }
示例#2
0
		public void Output(StringBuilder sb, AskText ask)
		{
			if (ask.list.Count == 0)
				return;
			AddValueNoCk(0, sb, "Text", "");
			foreach (var q in ask.list)
				AddValueCk(1, sb, q.Question);
			sb.AppendLine();
		}
示例#3
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);
 }
示例#4
0
		public AskText ParseAskText()
		{
			var tx = new AskText();
			lineno++;
			if (curr.indent == 0)
				return tx;
			var startindent = curr.indent;
			while (curr.indent == startindent)
			{
				if (curr.kw != RegKeywords.None)
					throw GetException("unexpected line");
				var q = new AskExtraQuestions.ExtraQuestion { Question = GetLine() };
				tx.list.Add(q);
			}
			return tx;
		}