Example #1
0
        public static CT_Wrap Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Wrap ctObj = new CT_Wrap();

            if (node.Attributes["type"] != null)
            {
                ctObj.type = (ST_WrapType)Enum.Parse(typeof(ST_WrapType), node.Attributes["type"].Value);
            }
            if (node.Attributes["side"] != null)
            {
                ctObj.side = (ST_WrapSide)Enum.Parse(typeof(ST_WrapSide), node.Attributes["side"].Value);
            }
            if (node.Attributes["anchorx"] != null)
            {
                ctObj.anchorx = (ST_HorizontalAnchor)Enum.Parse(typeof(ST_HorizontalAnchor), node.Attributes["anchorx"].Value);
            }
            if (node.Attributes["anchory"] != null)
            {
                ctObj.anchory = (ST_VerticalAnchor)Enum.Parse(typeof(ST_VerticalAnchor), node.Attributes["anchory"].Value);
            }
            return(ctObj);
        }
 public static CT_Wrap Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Wrap ctObj = new CT_Wrap();
     if (node.Attributes["type"] != null)
         ctObj.type = (ST_WrapType)Enum.Parse(typeof(ST_WrapType), node.Attributes["type"].Value);
     if (node.Attributes["side"] != null)
         ctObj.side = (ST_WrapSide)Enum.Parse(typeof(ST_WrapSide), node.Attributes["side"].Value);
     if (node.Attributes["anchorx"] != null)
         ctObj.anchorx = (ST_HorizontalAnchor)Enum.Parse(typeof(ST_HorizontalAnchor), node.Attributes["anchorx"].Value);
     if (node.Attributes["anchory"] != null)
         ctObj.anchory = (ST_VerticalAnchor)Enum.Parse(typeof(ST_VerticalAnchor), node.Attributes["anchory"].Value);
     return ctObj;
 }