Ejemplo n.º 1
0
 public static CT_Item Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Item ctObj = new CT_Item();
     ctObj.n = XmlHelper.ReadString(node.Attributes["n"]);
     if (node.Attributes["t"] != null)
         ctObj.t = (ST_ItemType)Enum.Parse(typeof(ST_ItemType), node.Attributes["t"].Value);
     if (node.Attributes["h"] != null)
         ctObj.h = XmlHelper.ReadBool(node.Attributes["h"]);
     if (node.Attributes["s"] != null)
         ctObj.s = XmlHelper.ReadBool(node.Attributes["s"]);
     if (node.Attributes["sd"] != null)
         ctObj.sd = XmlHelper.ReadBool(node.Attributes["sd"]);
     if (node.Attributes["f"] != null)
         ctObj.f = XmlHelper.ReadBool(node.Attributes["f"]);
     if (node.Attributes["m"] != null)
         ctObj.m = XmlHelper.ReadBool(node.Attributes["m"]);
     if (node.Attributes["c"] != null)
         ctObj.c = XmlHelper.ReadBool(node.Attributes["c"]);
     if (node.Attributes["x"] != null)
         ctObj.x = XmlHelper.ReadUInt(node.Attributes["x"]);
     if (node.Attributes["d"] != null)
         ctObj.d = XmlHelper.ReadBool(node.Attributes["d"]);
     if (node.Attributes["e"] != null)
         ctObj.e = XmlHelper.ReadBool(node.Attributes["e"]);
     return ctObj;
 }
Ejemplo n.º 2
0
 public CT_Item AddNewItem()
 {
     if (this.itemField == null)
         this.itemField = new List<CT_Item>();
     CT_Item i = new CT_Item();
     this.itemField.Add(i);
     return i;
 }