Ejemplo n.º 1
0
 /// <summary>
 /// Adds a cell to the row
 /// </summary>
 /// <param name="cell">The cell to add</param>
 public void AddCell(Cell cell)
 {
     AddCells(new[] { cell });
 }
Ejemplo n.º 2
0
        private CellBorders CreateCellBorders(Cell cell)
        {
            var borders = new CellBorders();

            if (cell.BorderTop != null)
            {
                borders.Top = new CellBorder(CellBorderStyle.Thin, new ThemableColor(cell.BorderTop.Color.ToColor()));
            }

            if (cell.BorderBottom != null)
            {
                borders.Bottom = new CellBorder(CellBorderStyle.Thin, new ThemableColor(cell.BorderBottom.Color.ToColor()));
            }

            if (cell.BorderLeft != null)
            {
                borders.Left = new CellBorder(CellBorderStyle.Thin, new ThemableColor(cell.BorderLeft.Color.ToColor()));
            }

            if (cell.BorderRight != null)
            {
                borders.Right = new CellBorder(CellBorderStyle.Thin, new ThemableColor(cell.BorderRight.Color.ToColor()));
            }

            return borders;
        }