Пример #1
0
        internal ExcelBorderItemXml Copy()
        {
            ExcelBorderItemXml borderItem = new ExcelBorderItemXml(NameSpaceManager);

            borderItem.Style = _borderStyle;
            borderItem.Color = _color.Copy();
            return(borderItem);
        }
Пример #2
0
 internal ExcelBorderXml(XmlNamespaceManager nsm, XmlNode topNode) :
     base(nsm, topNode)
 {
     _left     = new ExcelBorderItemXml(nsm, topNode.SelectSingleNode(leftPath, nsm));
     _right    = new ExcelBorderItemXml(nsm, topNode.SelectSingleNode(rightPath, nsm));
     _top      = new ExcelBorderItemXml(nsm, topNode.SelectSingleNode(topPath, nsm));
     _bottom   = new ExcelBorderItemXml(nsm, topNode.SelectSingleNode(bottomPath, nsm));
     _diagonal = new ExcelBorderItemXml(nsm, topNode.SelectSingleNode(diagonalPath, nsm));
 }
Пример #3
0
 private void SetBorderItem(ExcelBorderItemXml excelBorderItem, eStyleProperty styleProperty, object value)
 {
     if (styleProperty == eStyleProperty.Style)
     {
         excelBorderItem.Style = (ExcelBorderStyle)value;
     }
     else if (styleProperty == eStyleProperty.Color || styleProperty == eStyleProperty.Tint || styleProperty == eStyleProperty.IndexedColor)
     {
         if (excelBorderItem.Style == ExcelBorderStyle.None)
         {
             throw(new Exception("Can't set bordercolor when style is not set."));
         }
         excelBorderItem.Color.Rgb = value.ToString();
     }
 }