Пример #1
0
 public Column(Table table, string header, int id)
 {
     Field headerFld;
     _table = table; _id = id;
     if (header.Trim() != ""){
         headerFld = _table.Fields[this, 0];
         headerFld.Value = header;
         headerFld.IsHeader = true;
     }
 }
Пример #2
0
 public Table Add(Table table)
 {
     _tables.Add(table);
     return table;
 }
Пример #3
0
 public Columns(Table table)
 {
     _table = table;
 }
Пример #4
0
 public Rows(Table table)
 {
     _table = table;
 }
Пример #5
0
 public Row(Table table, int id)
 {
     _id = id;
     _table = table;
     Field[] flds = _table.Fields[this];
     for(int i=0; i<flds.Length; i++){
         flds[i].Value = ""; //Blank row
     }
 }
Пример #6
0
 public Row(Table table, string[] vals, int id)
 {
     _id = id;
     _table = table;
     Field[] flds = _table.Fields[this];
     for(int i=0; i<vals.Length; i++){
         flds[i].Value = vals[i];
     }
 }
Пример #7
0
 /*public string[] PrintText{
     get{
         //TODO: This isn't done. I might can be used to shink the width of a report to make it fit on a page.
         int colWidth;
         string rowString = "";
         ArrayList printText = new ArrayList();
         foreach(Sheet sheet in _sheets){
             foreach(Table table in sheet.Tables){
                 colWidth = (93 / table.Columns.Count) - Table.COLUMN_PAD;
                 foreach(Row row in table.Rows){
                     foreach(Field fld in row.Fields){
                         if (fld.Value.Length > colWidth)
                             fldVal = fld.Value.Substring(1, colWidth);
                         else
                             fldVal = fld.Value.PadRight(
                                 //rowString = fld.Value.Substring(1, colWidth) + " ".PadRight(Table.COLUMN_PAD);
                                 //printText.Add(rowString);
                 }
             }
         }
         return (string[])printText.ToArray();
     }
 }*/
 protected Table CreateDefaultTable(string title, params string[] columnHeaders)
 {
     Table table;
     Sheet sheet;
     if (_sheets[0] == null){
         sheet = new Sheet(this,title);
         _sheets.Add(sheet);
         table = new Table(sheet, title, columnHeaders);
         sheet.Add(table);
     }else{
         table = _sheets[0][0];
     }
     return table;
 }
Пример #8
0
 public Fields(Table table)
 {
     _table = table;
 }
Пример #9
0
 public Field(Table table, int row, int col)
 {
     _table = table;
     _column = _table.Columns[col];
     _row = _table.AddRow();
 }
Пример #10
0
 public Field(Table table, int row, Column col)
 {
     _table = table;
     _row = _table.Rows[row];
     if (_row == null)
         _row = _table.AddRow();
     _column = col;
 }
Пример #11
0
 public Field(Table table, Row row, Column col)
 {
     _table = table; _row = row; _column = col;
 }
Пример #12
0
 public Table Add(Table table)
 {
     List.Add(table);
     return table;
 }