Пример #1
0
 public LabelGroup AddSubLabelGroup(string name)
 {
     LabelGroup newLabelGroup = new LabelGroup();
     newLabelGroup.Name = name;
     this.labelGroup.Add(newLabelGroup);
     return newLabelGroup;
 }
Пример #2
0
 private static LabelGroup ElementToLabelGroup(XmlElement labelGroupEle, string fieldId)
 {
     if (labelGroupEle == null)
     {
         return null;
     }
     String name = XmlUtils.GetAttributeValue(labelGroupEle, "name");
     LabelGroup lg_result = new LabelGroup();
     lg_result.Name = name;
     List<XmlElement> labelEleList = XmlUtils.GetChildElements(labelGroupEle, "label");
     foreach (XmlElement labelEle in labelEleList)
     {
         Label label = new Label();
         String labelName = XmlUtils.GetAttributeValue(labelEle, "name");
         String labelValue = XmlUtils.GetAttributeValue(labelEle, "value");
         String labelDesc = XmlUtils.GetAttributeValue(labelEle, "desc");
         label.Name = labelName;
         label.Value = labelValue;
         label.Desc = labelDesc;
         lg_result.Add(label);
     }
     List<XmlElement> labelGroupEleList = XmlUtils.GetChildElements(labelGroupEle, "label-group");
     foreach (XmlElement subLabelGroupEle in labelGroupEleList)
     {
         LabelGroup subGroup = new LabelGroup();
         subGroup = ElementToLabelGroup(subLabelGroupEle, fieldId);
         lg_result.Add(subGroup);
     }
     return lg_result;
 }
Пример #3
0
 public void SetLabelGroup(LabelGroup labelGroup)
 {
     this.labelGroup = labelGroup;
 }
Пример #4
0
 public void Add(LabelGroup labelGroup)
 {
     this.labelGroupList.Add(labelGroup);
 }
Пример #5
0
 public void Add(LabelGroup labelGroup)
 {
     this.labelGroupList.Add(labelGroup);
 }