예제 #1
0
        private void AddColumns()
        {
            group = null;

            table = new Table();
            tables.Add(table);
            ++tableIndex;
            rowIndex = 0;

            if (tableIndex % 2 == 0)
            {
                Table.Row row = AddRow();
                row.cells[0].text = config.columns[0];
                row.cells[1].text = config.columns[1];
                row.cells[3].text = config.columns[2];
                row.cells[4].text = config.columns[3];
                row.cells[5].text = config.columns[4];
                row.cells[0].rowspan = 2;
                row.cells[1].rowspan = 2;
                row.cells[3].rowspan = 2;
                row.cells[4].rowspan = 2;
                row.cells[5].rowspan = 2;
                row.cells[1].colspan = 2;
                row.cells[0].cls = "column";
                row.cells[1].cls = "column";
                row.cells[3].cls = "column";
                row.cells[4].cls = "column";
                row.cells[5].cls = "column";
                AddRow();
            }
        }
예제 #2
0
 private void AddEmptyCells(Table.Row row, int count)
 {
     for (int i = 0; i < count; ++i)
         row.cells.Add(new Table.Cell());
 }
예제 #3
0
        private string RenderCode(int code)
        {
            if (code == 0)
                return "";

            string result = "";
            for (int i = 0; i < 4; ++i)
            {
                result = (code % 10).ToString() + result;
                code /= 10;
            }

            return result;
        }
예제 #4
0
        private void AddTableRow(Table.Row row, int t, int r)
        {
            if (t >= tables.Count)
            {
                AddEmptyCells(row, 6);
                return;
            }

            Table table = tables[t];
            if (r >= table.rows.Count)
            {
                AddEmptyCells(row, 6);
                return;
            }

            Table.Row inputRow = table.rows[r];
            for (int i = 0; i < 6; ++i)
                row.cells.Add(inputRow.cells[i]);
        }