Exemplo n.º 1
0
 private string FillCell(string text, Column column)
 {
     if (column.AlignRight == true)
         return "|" + new string(' ', column.Width - text.Length) + text;
     else
         return "|" + text + new string(' ', column.Width - text.Length);
 }
Exemplo n.º 2
0
 public void AddHeader(string header)
 {
     Column new_column = new Column();
     new_column.Text = header;
     mColumns.Add(new_column);
 }
Exemplo n.º 3
0
 private string CenterText(Column column, string text)
 {
     int column_width = column.Width;
     int whitespace = column_width - text.Length;
     int half = whitespace / 2;
     int filler = 0;
     if ((half + half + text.Length) < column_width)
         filler++;
     return new string(' ', half) + text + new string(' ', half + filler);
 }