示例#1
0
文件: PageSetup.cs 项目: ornoand/npoi
        public static CT_PageNumber Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_PageNumber ctObj = new CT_PageNumber();

            if (node.Attributes["w:fmt"] != null)
            {
                ctObj.fmt = (ST_NumberFormat)Enum.Parse(typeof(ST_NumberFormat), node.Attributes["w:fmt"].Value);
            }
            ctObj.start     = XmlHelper.ReadString(node.Attributes["w:start"]);
            ctObj.chapStyle = XmlHelper.ReadString(node.Attributes["w:chapStyle"]);
            if (node.Attributes["w:chapSep"] != null)
            {
                ctObj.chapSep = (ST_ChapterSep)Enum.Parse(typeof(ST_ChapterSep), node.Attributes["w:chapSep"].Value);
            }
            return(ctObj);
        }
示例#2
0
文件: PageSetup.cs 项目: hjlfmy/npoi
 public static CT_PageNumber Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_PageNumber ctObj = new CT_PageNumber();
     if (node.Attributes["w:fmt"] != null)
         ctObj.fmt = (ST_NumberFormat)Enum.Parse(typeof(ST_NumberFormat), node.Attributes["w:fmt"].Value);
     ctObj.start = XmlHelper.ReadString(node.Attributes["w:start"]);
     ctObj.chapStyle = XmlHelper.ReadString(node.Attributes["w:chapStyle"]);
     if (node.Attributes["w:chapSep"] != null)
         ctObj.chapSep = (ST_ChapterSep)Enum.Parse(typeof(ST_ChapterSep), node.Attributes["w:chapSep"].Value);
     return ctObj;
 }