Ejemplo n.º 1
0
        public static CT_ColorSchemeAndMapping Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_ColorSchemeAndMapping ctObj = new CT_ColorSchemeAndMapping();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "clrScheme")
                {
                    ctObj.clrScheme = CT_ColorScheme.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "clrMap")
                {
                    ctObj.clrMap = CT_ColorMapping.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Ejemplo n.º 2
0
 public CT_ClipboardStyleSheet()
 {
     this.clrMapField        = new CT_ColorMapping();
     this.themeElementsField = new CT_BaseStyles();
 }
Ejemplo n.º 3
0
        public static CT_ColorMapping Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_ColorMapping ctObj = new CT_ColorMapping();

            if (node.Attribute("bg1") != null)
            {
                ctObj.bg1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("bg1").Value);
            }
            if (node.Attribute("tx1") != null)
            {
                ctObj.tx1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("tx1").Value);
            }
            if (node.Attribute("bg2") != null)
            {
                ctObj.bg2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("bg2").Value);
            }
            if (node.Attribute("tx2") != null)
            {
                ctObj.tx2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("tx2").Value);
            }
            if (node.Attribute("accent1") != null)
            {
                ctObj.accent1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("accent1").Value);
            }
            if (node.Attribute("accent2") != null)
            {
                ctObj.accent2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("accent2").Value);
            }
            if (node.Attribute("accent3") != null)
            {
                ctObj.accent3 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("accent3").Value);
            }
            if (node.Attribute("accent4") != null)
            {
                ctObj.accent4 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("accent4").Value);
            }
            if (node.Attribute("accent5") != null)
            {
                ctObj.accent5 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("accent5").Value);
            }
            if (node.Attribute("accent6") != null)
            {
                ctObj.accent6 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("accent6").Value);
            }
            if (node.Attribute("hlink") != null)
            {
                ctObj.hlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("hlink").Value);
            }
            if (node.Attribute("folHlink") != null)
            {
                ctObj.folHlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attribute("folHlink").Value);
            }
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }