Esempio n. 1
0
        internal static CT_Path2DList Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            CT_Path2DList pathList = new CT_Path2DList();

            pathList.path = new List <CT_Path2D>();
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "path")
                {
                    pathList.pathField.Add(CT_Path2D.Parse(childNode, namespaceManager));
                }
            }
            return(pathList);
        }
Esempio n. 2
0
        public static CT_Path2D Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Path2D ctObj = new CT_Path2D();

            ctObj.w = XmlHelper.ReadLong(node.Attribute("w"));
            ctObj.h = XmlHelper.ReadLong(node.Attribute("h"));
            if (node.Attribute("fill") != null)
            {
                ctObj.fill = (ST_PathFillMode)Enum.Parse(typeof(ST_PathFillMode), node.Attribute("fill").Value);
            }
            ctObj.stroke      = XmlHelper.ReadBool(node.Attribute("stroke"));
            ctObj.extrusionOk = XmlHelper.ReadBool(node.Attribute("extrusionOk"));
            //foreach(XElement childNode in node.ChildElements())
            //{
            //    if(childNode.Name.LocalName == "ItemsElementName")
            //        ctObj.ItemsElementName = ItemsChoiceType[].Parse(childNode, namespaceManager);
            //}
            return(ctObj);
        }