private void printing(Document form) { int[] column1 = { 50, 50, 50 }; TableLayoutPanel tableLayoutPanel1 = this.control.tableLayoutPanel(column1, 22); int[] column2 = { 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; TableLayoutPanel tableLayoutPanel2 = this.control.tableLayoutPanel(column2, 27); tableLayoutPanel2.RowStyles.Insert(1, new RowStyle(SizeType.Percent, 380)); int[] column3 = { 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; TableLayoutPanel tableLayoutPanel3 = this.control.tableLayoutPanel(column3, 27); tableLayoutPanel3.RowStyles.Insert(1, new RowStyle(SizeType.Percent, 380)); int[] column4 = column3; TableLayoutPanel tableLayoutPanel4 = this.control.tableLayoutPanel(column4, 27); tableLayoutPanel4.RowStyles.Insert(1, new RowStyle(SizeType.Percent, 380)); int[] row5 = { 8, 230, 2 }; TableLayoutPanel tableLayoutPanel5 = this.control.tableLayoutPanel(1, row5); tableLayoutPanel5.Controls.Add(tableLayoutPanel2, 0, 1); int[] column6 = { 17, 14 }; TableLayoutPanel tableLayoutPanel6 = this.control.tableLayoutPanel(column6, 1); tableLayoutPanel6.Controls.Add(tableLayoutPanel5, 0, 0); TabControl tabControl2 = this.control.tabControl(); tableLayoutPanel6.Controls.Add(tabControl2, 1, 0); TabControl tabControl1 = this.control.tabControl(); TabPage tabPage1 = this.control.tabPage(FormText.printing[1]); TabPage tabPage2 = this.control.tabPage(FormText.printing[2]); tabControl1.Controls.Add(tabPage1); tabControl1.Controls.Add(tabPage2); tabPage1.Controls.Add(tableLayoutPanel1); tabPage2.Controls.Add(tableLayoutPanel6); TabPage tabPage3 = this.control.tabPage(FormText.printing[3]); TabPage tabPage4 = this.control.tabPage(FormText.printing[4]); tabControl2.Controls.Add(tabPage3); tabControl2.Controls.Add(tabPage4); tabPage3.Controls.Add(tableLayoutPanel3); tabPage4.Controls.Add(tableLayoutPanel4); // //размещение заголовков // ControlType control = new ControlType(); int index = 0; for (int i = 0; i < tableLayoutPanel1.RowCount; i++) { this.control.tableLayoutPanel(tableLayoutPanel1, 0, i, form.name[index++]); } this.control.tableLayoutPanel(tableLayoutPanel2, 0, 1, control.label(form.name[index++], DockStyle.Bottom)); for (int j = 1; j < tableLayoutPanel2.RowCount; j++) { this.control.tableLayoutPanel(tableLayoutPanel2, 1, j, form.name[index++]); } this.control.tableLayoutPanel(tableLayoutPanel3, 0, 1, control.label(form.name[index++], DockStyle.Bottom)); this.control.tableLayoutPanel(tableLayoutPanel4, 0, 1, control.label(form.name[index++], DockStyle.Bottom)); // //размещение контролов save // index = 0; for (int j = 0; j < tableLayoutPanel1.RowCount; j++) { this.control.tableLayoutPanel(tableLayoutPanel1, 1, j, form.save[index++]); } for (int j = 2; j < tableLayoutPanel2.RowCount - 3; j++) { this.control.tableLayoutPanel(tableLayoutPanel2, 0, j, form.save[index++]); } for (int i = 2; i < tableLayoutPanel2.ColumnCount; i++) { for (int j = 0; j < tableLayoutPanel2.RowCount; j++) { this.control.tableLayoutPanel(tableLayoutPanel2, i, j, form.save[index++]); } } // //размещение контролов load // index = 0; for (int j = 0; j < tableLayoutPanel1.RowCount; j++) { this.control.tableLayoutPanel(tableLayoutPanel1, 2, j, form.load[index++]); } for (int j = 2; j < tableLayoutPanel3.RowCount - 3; j++) { this.control.tableLayoutPanel(tableLayoutPanel3, 0, j, form.load[index++]); } for (int i = 1; i < tableLayoutPanel3.ColumnCount; i++) { for (int j = 0; j < tableLayoutPanel3.RowCount; j++) { this.control.tableLayoutPanel(tableLayoutPanel3, i, j, form.load[index++]); } } for (int j = 2; j < tableLayoutPanel4.RowCount - 3; j++) { this.control.tableLayoutPanel(tableLayoutPanel4, 0, j, form.load[index++]); } for (int i = 1; i < tableLayoutPanel4.ColumnCount; i++) { for (int j = 0; j < tableLayoutPanel4.RowCount; j++) { this.control.tableLayoutPanel(tableLayoutPanel4, i, j, form.load[index++]); } } form.Controls.Add(tabControl1); }