Ejemplo n.º 1
0
        public static CT_TableStyleElement Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TableStyleElement ctObj = new CT_TableStyleElement();

            if (node.Attribute("type") != null)
            {
                ctObj.type = (ST_TableStyleType)Enum.Parse(typeof(ST_TableStyleType), node.Attribute("type").Value);
            }
            ctObj.size  = XmlHelper.ReadUInt(node.Attribute("size"));
            ctObj.dxfId = XmlHelper.ReadUInt(node.Attribute("dxfId"));
            return(ctObj);
        }
Ejemplo n.º 2
0
        public static CT_TableStyle Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TableStyle ctObj = new CT_TableStyle();

            ctObj.name              = XmlHelper.ReadString(node.Attribute("name"));
            ctObj.pivot             = XmlHelper.ReadBool(node.Attribute("pivot"));
            ctObj.table             = XmlHelper.ReadBool(node.Attribute("table"));
            ctObj.count             = XmlHelper.ReadUInt(node.Attribute("count"));
            ctObj.tableStyleElement = new List <CT_TableStyleElement>();
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "tableStyleElement")
                {
                    ctObj.tableStyleElement.Add(CT_TableStyleElement.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }