Пример #1
0
 internal ExcelFontXml(XmlNamespaceManager nsm, XmlNode topNode) :
     base(nsm, topNode)
 {
     _name          = GetXmlNodeString(namePath);
     _size          = (float)GetXmlNodeDecimal(sizePath);
     _family        = GetXmlNodeInt(familyPath);
     _scheme        = GetXmlNodeString(schemePath);
     _color         = new ExcelColorXml(nsm, topNode.SelectSingleNode(_colorPath, nsm));
     _bold          = (topNode.SelectSingleNode(boldPath, NameSpaceManager) != null);
     _italic        = (topNode.SelectSingleNode(italicPath, NameSpaceManager) != null);
     _strike        = (topNode.SelectSingleNode(strikePath, NameSpaceManager) != null);
     _verticalAlign = GetXmlNodeString(verticalAlignPath);
     if (topNode.SelectSingleNode(underLinedPath, NameSpaceManager) != null)
     {
         string ut = GetXmlNodeString(underLinedPath + "/@val");
         if (ut == "")
         {
             _underlineType = ExcelUnderLineType.Single;
         }
         else
         {
             _underlineType = (ExcelUnderLineType)Enum.Parse(typeof(ExcelUnderLineType), ut, true);
         }
     }
     else
     {
         _underlineType = ExcelUnderLineType.None;
     }
 }
Пример #2
0
 internal ExcelFillXml(XmlNamespaceManager nsm, XmlNode topNode) :
     base(nsm, topNode)
 {
     PatternType      = GetPatternType(GetXmlNodeString(fillPatternTypePath));
     _backgroundColor = new ExcelColorXml(nsm, topNode.SelectSingleNode(_backgroundColorPath, nsm));
     _patternColor    = new ExcelColorXml(nsm, topNode.SelectSingleNode(_patternColorPath, nsm));
 }
Пример #3
0
 internal ExcelFillXml(XmlNamespaceManager nameSpaceManager)
     : base(nameSpaceManager)
 {
     _fillPatternType = ExcelFillStyle.None;
     _backgroundColor = new ExcelColorXml(NameSpaceManager);
     _patternColor    = new ExcelColorXml(NameSpaceManager);
 }
Пример #4
0
        internal ExcelGradientFillXml(XmlNamespaceManager nsm, XmlNode topNode) :
            base(nsm, topNode)
        {
            Degree         = GetXmlNodeDouble(_degreePath);
            Type           = GetXmlNodeString(_typePath) == "path" ? ExcelFillGradientType.Path : ExcelFillGradientType.Linear;
            GradientColor1 = new ExcelColorXml(nsm, topNode.SelectSingleNode(_gradientColor1Path, nsm));
            GradientColor2 = new ExcelColorXml(nsm, topNode.SelectSingleNode(_gradientColor2Path, nsm));

            Top    = GetXmlNodeDouble(_topPath);
            Bottom = GetXmlNodeDouble(_bottomPath);
            Left   = GetXmlNodeDouble(_leftPath);
            Right  = GetXmlNodeDouble(_rightPath);
        }
Пример #5
0
 internal ExcelBorderItemXml(XmlNamespaceManager nsm, XmlNode topNode) :
     base(nsm, topNode)
 {
     if (topNode != null)
     {
         _borderStyle = GetBorderStyle(GetXmlNodeString("@style"));
         _color       = new ExcelColorXml(nsm, topNode.SelectSingleNode(_colorPath, nsm));
         Exists       = true;
     }
     else
     {
         Exists = false;
     }
 }
Пример #6
0
 internal ExcelFontXml(XmlNamespaceManager nameSpaceManager)
     : base(nameSpaceManager)
 {
     _name          = "";
     _size          = 0;
     _family        = int.MinValue;
     _scheme        = "";
     _color         = _color = new ExcelColorXml(NameSpaceManager);
     _bold          = false;
     _italic        = false;
     _strike        = false;
     _underlineType = ExcelUnderLineType.None;
     _verticalAlign = "";
 }
Пример #7
0
 internal ExcelGradientFillXml(XmlNamespaceManager nameSpaceManager)
     : base(nameSpaceManager)
 {
     GradientColor1 = new ExcelColorXml(nameSpaceManager);
     GradientColor2 = new ExcelColorXml(nameSpaceManager);
 }
Пример #8
0
 internal ExcelBorderItemXml(XmlNamespaceManager nameSpaceManager) : base(nameSpaceManager)
 {
     _borderStyle = ExcelBorderStyle.None;
     _color       = new ExcelColorXml(NameSpaceManager);
 }