private void foreignPositionChartToolStripMenuItem1_Click(object sender, EventArgs e) { if (foreignChartForm == null) { foreignChartForm = new ForeignChartForm(); this.IsMdiContainer = true; foreignChartForm.MdiParent = this; MainPanel.Visible = false; foreignChartForm.FormClosed += ForeignChartForm_FormClosed; foreignChartForm.Show(); } else { foreignChartForm.Activate(); } }
private void ForeignChartForm_FormClosed(object sender, FormClosedEventArgs e) { foreignChartForm = null; }