private void SetShading(IHaveABorderAndShading shadingHolder, string shading) { if (!shading.Equals("Transparent")) { string text2 = shadingHolder.BackgroundColor = WordOpenXmlUtils.RgbColor(new RPLReportColor(shading).ToColor()); } }
public void WriteCellDiagonal(int cellIndex, RPLFormat.BorderStyles style, string width, string color, bool slantUp) { OpenXmlTableCellModel currentCell = _document.TableContext.CurrentCell; OpenXmlBorderPropertiesModel obj = slantUp ? currentCell.CellProperties.BorderDiagonalUp : currentCell.CellProperties.BorderDiagonalDown; obj.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); obj.Style = RPLFormatToBorderStyle(style); obj.WidthInEighthPoints = (int)Math.Floor(new RPLReportSize(width).ToPoints() * 8.0); }
private void SetBorderColor(IHaveABorderAndShading borderHolder, string color, TableData.Positions side) { switch (side) { case TableData.Positions.Top: borderHolder.BorderTop.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; case TableData.Positions.Bottom: borderHolder.BorderBottom.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; case TableData.Positions.Left: borderHolder.BorderLeft.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; case TableData.Positions.Right: borderHolder.BorderRight.Color = WordOpenXmlUtils.RgbColor(new RPLReportColor(color).ToColor()); break; } }