Esempio n. 1
0
        public static CT_Background Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Background ctObj = new CT_Background();

            ctObj.color = XmlHelper.ReadString(node.Attributes["w:color"]);
            if (node.Attributes["w:themeColor"] != null)
            {
                ctObj.themeColor = (ST_ThemeColor)Enum.Parse(typeof(ST_ThemeColor), node.Attributes["w:themeColor"].Value);
            }
            ctObj.themeTint  = XmlHelper.ReadBytes(node.Attributes["w:themeTint"]);
            ctObj.themeShade = XmlHelper.ReadBytes(node.Attributes["w:themeShade"]);

            return(ctObj);
        }
Esempio n. 2
0
        public static CT_Document Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Document ctObj = new CT_Document();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "body")
                {
                    ctObj.body = CT_Body.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "background")
                {
                    ctObj.background = CT_Background.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Esempio n. 3
0
        public static CT_Background Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
                return null;
            CT_Background ctObj = new CT_Background();
            ctObj.color = XmlHelper.ReadString(node.Attributes["w:color"]);
            if (node.Attributes["w:themeColor"] != null)
                ctObj.themeColor = (ST_ThemeColor)Enum.Parse(typeof(ST_ThemeColor), node.Attributes["w:themeColor"].Value);
            ctObj.themeTint = XmlHelper.ReadBytes(node.Attributes["w:themeTint"]);
            ctObj.themeShade = XmlHelper.ReadBytes(node.Attributes["w:themeShade"]);

            return ctObj;
        }