コード例 #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;
            _result.SetFont(font);
        }
コード例 #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);
 }
コード例 #3
0
 /// <summary>
 /// 设置背景色
 /// </summary>
 private void SetBackgroundColor()
 {
     _result.FillForegroundColor = ColorResolver.Resolve(_style.BackgroundColor);
 }