Beispiel #1
0
        public static CT_PatternFill Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_PatternFill ctObj = new CT_PatternFill();

            if (node.Attribute("patternType") != null)
            {
                ctObj.patternType = (ST_PatternType)Enum.Parse(typeof(ST_PatternType), node.Attribute("patternType").Value);
            }
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "fgColor")
                {
                    ctObj.fgColor = CT_Color.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "bgColor")
                {
                    ctObj.bgColor = CT_Color.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Beispiel #2
0
        public static CT_Fill Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Fill ctObj = new CT_Fill();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "patternFill")
                {
                    ctObj.patternFill = CT_PatternFill.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "gradientFill")
                {
                    ctObj.gradientFill = CT_GradientFill.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Beispiel #3
0
 public CT_PatternFill AddNewPatternFill()
 {
     this.patternFillField = new CT_PatternFill();
     return(GetPatternFill());
 }