Esempio n. 1
0
        /// <summary>
        /// 设置字体
        /// </summary>
        private void SetFont()
        {
            var font = _workbook.CreateFont();

            font.FontHeightInPoints = _style.FontSize;
            font.Color      = ColorResolver.Resolve(_style.FontColor);
            font.Boldweight = _style.FontBoldWeight;
            font.IsItalic   = _style.Italic;
            _result.SetFont(font);
        }
Esempio n. 2
0
 /// <summary>
 /// 设置边框颜色
 /// </summary>
 private void SetBorderColor()
 {
     _result.BorderTop         = BorderStyle.Thin;
     _result.BorderRight       = BorderStyle.Thin;
     _result.BorderBottom      = BorderStyle.Thin;
     _result.BorderLeft        = BorderStyle.Thin;
     _result.TopBorderColor    = ColorResolver.Resolve(_style.BorderColor);
     _result.RightBorderColor  = ColorResolver.Resolve(_style.BorderColor);
     _result.BottomBorderColor = ColorResolver.Resolve(_style.BorderColor);
     _result.LeftBorderColor   = ColorResolver.Resolve(_style.BorderColor);
 }
Esempio n. 3
0
 /// <summary>
 /// 设置前景色
 /// </summary>
 private void SetForegroundColor()
 {
     _result.FillForegroundColor = ColorResolver.Resolve(_style.ForegroundColor);
 }
Esempio n. 4
0
 /// <summary>
 /// 设置背景色
 /// </summary>
 private void SetBackgroundColor()
 {
     _result.FillBackgroundColor = ColorResolver.Resolve(_style.BackgroundColor);
 }