Пример #1
0
        internal static CT_Path2DList Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            CT_Path2DList pathList = new CT_Path2DList();

            pathList.path = new List <CT_Path2D>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "path")
                {
                    pathList.pathField.Add(CT_Path2D.Parse(childNode, namespaceManager));
                }
            }
            return(pathList);
        }
Пример #2
0
        public static CT_CustomGeometry2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CustomGeometry2D ctObj = new CT_CustomGeometry2D();

            ctObj.avLst   = new List <CT_GeomGuide>();
            ctObj.gdLst   = new List <CT_GeomGuide>();
            ctObj.ahLst   = new List <Object>();
            ctObj.cxnLst  = new List <CT_ConnectionSite>();
            ctObj.pathLst = new List <CT_Path2D>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "rect")
                {
                    ctObj.rect = CT_GeomRect.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "avLst")
                {
                    ctObj.avLst.Add(CT_GeomGuide.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "gdLst")
                {
                    ctObj.gdLst.Add(CT_GeomGuide.Parse(childNode, namespaceManager));
                }
                //else if (childNode.LocalName == "ahLst")
                //    ctObj.ahLst.Add(Object.Parse(childNode, namespaceManager));
                else if (childNode.LocalName == "cxnLst")
                {
                    ctObj.cxnLst.Add(CT_ConnectionSite.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "pathLst")
                {
                    ctObj.pathLst.Add(CT_Path2D.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Пример #3
0
        public static CT_Path2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Path2D ctObj = new CT_Path2D();

            ctObj.w = XmlHelper.ReadLong(node.Attributes["w"]);
            ctObj.h = XmlHelper.ReadLong(node.Attributes["h"]);
            if (node.Attributes["fill"] != null)
            {
                ctObj.fill = (ST_PathFillMode)Enum.Parse(typeof(ST_PathFillMode), node.Attributes["fill"].Value);
            }
            ctObj.stroke      = XmlHelper.ReadBool(node.Attributes["stroke"]);
            ctObj.extrusionOk = XmlHelper.ReadBool(node.Attributes["extrusionOk"]);
            //foreach(XmlNode childNode in node.ChildNodes)
            //{
            //    if(childNode.LocalName == "ItemsElementName")
            //        ctObj.ItemsElementName = ItemsChoiceType[].Parse(childNode, namespaceManager);
            //}
            return(ctObj);
        }
Пример #4
0
 public static CT_Path2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Path2D ctObj = new CT_Path2D();
     ctObj.w = XmlHelper.ReadLong(node.Attributes["w"]);
     ctObj.h = XmlHelper.ReadLong(node.Attributes["h"]);
     if (node.Attributes["fill"] != null)
         ctObj.fill = (ST_PathFillMode)Enum.Parse(typeof(ST_PathFillMode), node.Attributes["fill"].Value);
     ctObj.stroke = XmlHelper.ReadBool(node.Attributes["stroke"]);
     ctObj.extrusionOk = XmlHelper.ReadBool(node.Attributes["extrusionOk"]);
     //foreach(XmlNode childNode in node.ChildNodes)
     //{
     //    if(childNode.LocalName == "ItemsElementName")
     //        ctObj.ItemsElementName = ItemsChoiceType[].Parse(childNode, namespaceManager);
     //}
     return ctObj;
 }