コード例 #1
0
        public CT_Fill AddNewFill()
        {
            CT_Fill fill = new CT_Fill();

            this.fillField = fill;
            return(fill);
        }
コード例 #2
0
        public static CT_Fills Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Fills ctObj = new CT_Fills();

            ctObj.count = XmlHelper.ReadUInt(node.Attribute("count"));
            ctObj.fill  = new List <CT_Fill>();
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "fill")
                {
                    ctObj.fill.Add(CT_Fill.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
コード例 #3
0
        public static CT_Dxf Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Dxf ctObj = new CT_Dxf();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "font")
                {
                    ctObj.font = CT_Font.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "numFmt")
                {
                    ctObj.numFmt = CT_NumFmt.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "fill")
                {
                    ctObj.fill = CT_Fill.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "alignment")
                {
                    ctObj.alignment = CT_CellAlignment.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "border")
                {
                    ctObj.border = CT_Border.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "protection")
                {
                    ctObj.protection = CT_CellProtection.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
コード例 #4
0
ファイル: CT_Fill.cs プロジェクト: ruo2012/Npoi.Core
        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);
        }