public override void InitTitlesAndHeaders() { var content = (this.Content as AlimentadorContent); this.Write(content.Tablero, 0, 0); this.Write(content.Description, 1, 0); this.Table.Cells[1, 0].Alignment = CellAlignment.BottomLeft; this.Write("Alimentador", 5, 0); this.Write("Factores", 5, 14); this.Write(content.PageFormat, this.Table.Rows.Count - 1, 0); this.Table.Cells[this.Table.Rows.Count - 1, 0].Alignment = CellAlignment.MiddleRight; List <CellRange> mergeCells = new CellRange[] { CellRange.Create(this.Table, 1, 0, 4, 23), CellRange.Create(this.Table, 5, 0, 7, 2), CellRange.Create(this.Table, 5, 14, 7, 15), CellRange.Create(this.Table, this.Table.Rows.Count - 1, 0, this.Table.Rows.Count - 1, this.Table.Columns.Count - 1), }.Union(this.CreateHeaders(5, 3)).ToList(); //Se actualizan las filas mezcladas mergeCells.ForEach(cell => this.Table.MergeCells(cell)); var sHeaders = this.SubHeaders; for (int i = 0; i < sHeaders.Length; i++) { if (sHeaders[i] != null) { this.Write(sHeaders[i].Item1, 8, i, columnWidth: sHeaders[i].Item2); } } }
/// <summary> /// /// </summary> public override void InitTitlesAndHeaders() { //Se insertan los títulos de la tabla this.Table.Cells[0, 0].TextString = this.Content.Tablero; //Las filas que deben mezclarse List <CellRange> mergeCells = new CellRange[] { CellRange.Create(this.Table, 1, 0, 7, 3), CellRange.Create(this.Table, 8, 0, this.Table.Rows.Count - 1, 3), CellRange.Create(this.Table, 1, 4, 2, 11), CellRange.Create(this.Table, 4, 4, 7, 11), CellRange.Create(this.Table, 8, this.Content.CmpColumns.Length + 5, 8, this.Table.Columns.Count - 1), CellRange.Create(this.Table, 12, 4, 12, this.Table.Columns.Count - 1), CellRange.Create(this.Table, 13, 5, 13, this.Table.Columns.Count - 7), CellRange.Create(this.Table, 13, this.Table.Columns.Count - 5, 13, this.Table.Columns.Count - 1), CellRange.Create(this.Table, this.Table.Rows.Count - 2, 6 + this.Content.CmpColumns.Length, this.Table.Rows.Count - 2, this.Table.Columns.Count - 1), CellRange.Create(this.Table, this.Table.Rows.Count - 1, 6 + this.Content.CmpColumns.Length, this.Table.Rows.Count - 1, this.Table.Columns.Count - 6), CellRange.Create(this.Table, this.Table.Rows.Count - 1, this.Table.Columns.Count - 2, this.Table.Rows.Count - 1, this.Table.Columns.Count - 1), }.Union(this.CreateHeaders(9, 5 + this.Content.CmpColumns.Length)).ToList(); this.ChangeBorders(1, 0, true, true, false, false); this.ChangeBorders(8, 0, true, true, false, false); //Se insertan los titulos de circuitos int rowCount = this.Table.Rows.Count - 1; this.Write("W", 8, 4, columnWidth: COLUMNWIDTH * 2.5); this.Write("Simbolo", 9, 4, rowHeight: COLUMNWIDTH * 2); this.Write("Potencia", 10, 4); this.Write("V.A.", 11, 4); this.Write("C.T.O", 13, 4); this.Write("Unidades", rowCount - 2, 4); this.Write("Watts", rowCount - 1, 4); this.Write("VA", rowCount, 4); this.Write(this.Content.TotalWatts.ToNumberFormat(), rowCount - 1, 5 + this.Content.CmpColumns.Length); this.Write(this.Content.TotalVA.ToNumberFormat(), rowCount, 5 + this.Content.CmpColumns.Length); //Se actualizan las filas mezcladas mergeCells.ForEach(cell => this.Table.MergeCells(cell)); }