示例#1
0
        private XLFontValue(XLFontKey key)
        {
            Key = key;
            var fontColorKey = Key.FontColor;

            FontColor = XLColor.FromKey(ref fontColorKey);
        }
示例#2
0
        private XLFillValue(XLFillKey key)
        {
            Key = key;
            var backgroundColorKey = Key.BackgroundColor;
            var patternColorKey    = Key.PatternColor;

            BackgroundColor = XLColor.FromKey(ref backgroundColorKey);
            PatternColor    = XLColor.FromKey(ref patternColorKey);
        }
示例#3
0
        private XLBorderValue(XLBorderKey key)
        {
            Key = key;

            LeftBorderColor     = XLColor.FromKey(Key.LeftBorderColor);
            RightBorderColor    = XLColor.FromKey(Key.RightBorderColor);
            TopBorderColor      = XLColor.FromKey(Key.TopBorderColor);
            BottomBorderColor   = XLColor.FromKey(Key.BottomBorderColor);
            DiagonalBorderColor = XLColor.FromKey(Key.DiagonalBorderColor);
        }
示例#4
0
        private XLBorderValue(XLBorderKey key)
        {
            Key = key;
            var leftBorderColor     = Key.LeftBorderColor;
            var rightBorderColor    = Key.RightBorderColor;
            var topBorderColor      = Key.TopBorderColor;
            var bottomBorderColor   = Key.BottomBorderColor;
            var diagonalBorderColor = Key.DiagonalBorderColor;

            LeftBorderColor     = XLColor.FromKey(ref leftBorderColor);
            RightBorderColor    = XLColor.FromKey(ref rightBorderColor);
            TopBorderColor      = XLColor.FromKey(ref topBorderColor);
            BottomBorderColor   = XLColor.FromKey(ref bottomBorderColor);
            DiagonalBorderColor = XLColor.FromKey(ref diagonalBorderColor);
        }
示例#5
0
 public void Dispose()
 {
     _topBorders.ForEach(kp => _range.FirstRow().Cell(kp.Key).Style
                         .Border.SetTopBorder(kp.Value.TopBorder)
                         .Border.SetTopBorderColor(XLColor.FromKey(kp.Value.TopBorderColor)));
     _bottomBorders.ForEach(kp => _range.LastRow().Cell(kp.Key).Style
                            .Border.SetBottomBorder(kp.Value.BottomBorder)
                            .Border.SetBottomBorderColor(XLColor.FromKey(kp.Value.BottomBorderColor)));
     _leftBorders.ForEach(kp => _range.FirstColumn().Cell(kp.Key).Style
                          .Border.SetLeftBorder(kp.Value.LeftBorder)
                          .Border.SetLeftBorderColor(XLColor.FromKey(kp.Value.LeftBorderColor)));
     _rightBorders.ForEach(kp => _range.LastColumn().Cell(kp.Key).Style
                           .Border.SetRightBorder(kp.Value.RightBorder)
                           .Border.SetRightBorderColor(XLColor.FromKey(kp.Value.RightBorderColor)));
 }
示例#6
0
        private XLFontValue(XLFontKey key)
        {
            Key = key;

            FontColor = XLColor.FromKey(Key.FontColor);
        }
示例#7
0
 private XLFillValue(XLFillKey key)
 {
     Key             = key;
     BackgroundColor = XLColor.FromKey(Key.BackgroundColor);
     PatternColor    = XLColor.FromKey(Key.PatternColor);
 }