//private void toolStripButtonNew_Click_1(object sender, EventArgs e) //{ // this.panel1.Controls.Clear(); // DrawForm drawForm = new DrawForm(this, childnum++, sender.ToString()); // drawForm.TopLevel = false; // drawForm.Dock = System.Windows.Forms.DockStyle.Fill; // drawForm.FormBorderStyle = FormBorderStyle.None; // this.panel1.Controls.Add(drawForm); // currentlyDrawForm = drawForm; // drawForm.Show(); // SetStateOfControls(); //} private void OpenNewDrawForm(object sender, EventArgs e) { this.panel1.Controls.Clear(); DrawForm drawForm = new DrawForm(this, childnum++, sender.ToString()); drawForm.TopLevel = false; drawForm.Dock = System.Windows.Forms.DockStyle.Fill; drawForm.FormBorderStyle = FormBorderStyle.None; this.panel1.Controls.Add(drawForm); currentlyDrawForm = drawForm; drawForm.Show(); SetStateOfControls(); }
/// <summary> /// 初始化新建绘画面板 /// </summary> private void DrawForm() { if (stationFilterList.Count > 0) { DrawForm drawForm = new DrawForm(this, childnum++, stationFilterList[0].Code); drawForm.TopLevel = false; drawForm.Dock = System.Windows.Forms.DockStyle.Fill; drawForm.FormBorderStyle = FormBorderStyle.None; this.panel1.Controls.Add(drawForm); currentlyDrawForm = drawForm; drawForm.Show(); } }