private void FormIOMonitor_Load(object sender, EventArgs e) { foreach (KeyValuePair <string, TableDriver> item in TableManage.tableDrivers.drivers) { comboBoxTables.Items.Add(item.Value.strDriverName); } if (comboBoxTables.Items.Count > 0) { comboBoxTables.SelectedIndex = 0; frmTableDriver = new FormTableDriver(TableManage.tableDrivers.drivers[comboBoxTables.Items[0].ToString()]); frmTableDriver.TopLevel = false; panelTable.Controls.Add(frmTableDriver); //frmTableDriver.Size = panelTable.Size; frmTableDriver.Dock = DockStyle.Fill; frmTableDriver.Show(); } frmIoDriver = new FormIODriver(); frmIoDriver.TopLevel = false; panelIO.Controls.Add(frmIoDriver); //frmIoDriver.Size = panelIO.Size; frmIoDriver.Dock = DockStyle.Fill; frmIoDriver.Show(); timer1.Start(); //this.Resize += new EventHandler(Main_Resize); //X = this.Width; //Y = this.Height; //setTag(this); //Main_Resize(new object(), new EventArgs());//x,y //this.MaximizeBox = true; //this.WindowState = FormWindowState.Maximized; }
private void timer1_Tick(object sender, EventArgs e) { formTableDriver = new FormTableDriver(); formTableDriver.TopLevel = false; panelMain.Controls.Add(formTableDriver); formTableDriver.Dock = DockStyle.Fill; formTableDriver.Show(); formTableDriver.panelExternView.Controls.Clear(); MainModule.formMain.formManualEx.TopLevel = false; MainModule.formMain.formManualEx.Dock = DockStyle.Fill; MainModule.formMain.formManualEx.Size = formTableDriver.panelExternView.Size; formTableDriver.panelExternView.Controls.Add(MainModule.formMain.formManualEx); MainModule.formMain.formManualEx.Show(); timer1.Stop(); }