public MCell AddCell(Node node, int index) { MCell cell = new MCell(this, node, index); this.cells.Add(cell); return(cell); }
public MCell AddCell(Node node, int index) { MCell cell = new MCell(this, node, index); this.cells.Add(cell); return cell; }
private void UpdateRowspan() { for (int i = 0; i < this.rows.Count; i++) { for (int j = 0; j < ((MRow) this.rows[i]).cells.Count; j++) { if ((((MCell) ((MRow) this.rows[i]).cells[j]).tableAttrs != null) && (((MCell) ((MRow) this.rows[i]).cells[j]).tableAttrs.rowSpan > 1)) { MCell cell = (MCell) ((MRow) this.rows[i]).cells[j]; if (cell.rowSpan > 1) { int cspan = cell.colSpan; for (int k = 1; k < cell.rowSpan; k++) { int ci = 0; bool err = false; int numCells = 0; while (((cspan + ci) < this.ColCount) && !err) { try { if (this.Get(i + k, cspan + ci) != null) { numCells++; } ci++; continue; } catch { err = true; continue; } } MCell[] cells = new MCell[numCells]; ci = 0; while (((cspan + ci) < this.ColCount) && !err) { try { MCell cll = this.Get(i + k, cspan + ci); if (cll != null) { cells[ci] = cll; } ci++; continue; } catch { err = true; continue; } } for (int c = 0; c < numCells; c++) { cells[c].colSpan += cell.columnSpan; } } } } } } }