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

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "clrScheme")
                {
                    ctObj.clrScheme = CT_ColorScheme.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "clrMap")
                {
                    ctObj.clrMap = CT_ColorMapping.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Exemple #2
0
 public static CT_ColorMapping Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_ColorMapping ctObj = new CT_ColorMapping();
     if (node.Attributes["bg1"] != null)
         ctObj.bg1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["bg1"].Value);
     if (node.Attributes["tx1"] != null)
         ctObj.tx1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["tx1"].Value);
     if (node.Attributes["bg2"] != null)
         ctObj.bg2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["bg2"].Value);
     if (node.Attributes["tx2"] != null)
         ctObj.tx2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["tx2"].Value);
     if (node.Attributes["accent1"] != null)
         ctObj.accent1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent1"].Value);
     if (node.Attributes["accent2"] != null)
         ctObj.accent2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent2"].Value);
     if (node.Attributes["accent3"] != null)
         ctObj.accent3 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent3"].Value);
     if (node.Attributes["accent4"] != null)
         ctObj.accent4 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent4"].Value);
     if (node.Attributes["accent5"] != null)
         ctObj.accent5 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent5"].Value);
     if (node.Attributes["accent6"] != null)
         ctObj.accent6 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent6"].Value);
     if (node.Attributes["hlink"] != null)
         ctObj.hlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["hlink"].Value);
     if (node.Attributes["folHlink"] != null)
         ctObj.folHlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["folHlink"].Value);
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
Exemple #3
0
 public CT_ClipboardStyleSheet()
 {
     this.clrMapField        = new CT_ColorMapping();
     this.themeElementsField = new CT_BaseStyles();
 }
Exemple #4
0
        public static CT_ColorMapping Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_ColorMapping ctObj = new CT_ColorMapping();

            if (node.Attributes["bg1"] != null)
            {
                ctObj.bg1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["bg1"].Value);
            }
            if (node.Attributes["tx1"] != null)
            {
                ctObj.tx1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["tx1"].Value);
            }
            if (node.Attributes["bg2"] != null)
            {
                ctObj.bg2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["bg2"].Value);
            }
            if (node.Attributes["tx2"] != null)
            {
                ctObj.tx2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["tx2"].Value);
            }
            if (node.Attributes["accent1"] != null)
            {
                ctObj.accent1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent1"].Value);
            }
            if (node.Attributes["accent2"] != null)
            {
                ctObj.accent2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent2"].Value);
            }
            if (node.Attributes["accent3"] != null)
            {
                ctObj.accent3 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent3"].Value);
            }
            if (node.Attributes["accent4"] != null)
            {
                ctObj.accent4 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent4"].Value);
            }
            if (node.Attributes["accent5"] != null)
            {
                ctObj.accent5 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent5"].Value);
            }
            if (node.Attributes["accent6"] != null)
            {
                ctObj.accent6 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent6"].Value);
            }
            if (node.Attributes["hlink"] != null)
            {
                ctObj.hlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["hlink"].Value);
            }
            if (node.Attributes["folHlink"] != null)
            {
                ctObj.folHlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["folHlink"].Value);
            }
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Exemple #5
0
 public CT_ColorSchemeAndMapping()
 {
     this.clrMapField    = new CT_ColorMapping();
     this.clrSchemeField = new CT_ColorScheme();
 }
Exemple #6
0
 public CT_ClipboardStyleSheet()
 {
     this.clrMapField = new CT_ColorMapping();
     this.themeElementsField = new CT_BaseStyles();
 }
Exemple #7
0
 public CT_ColorSchemeAndMapping()
 {
     this.clrMapField = new CT_ColorMapping();
     this.clrSchemeField = new CT_ColorScheme();
 }