private void monthlyToolStripMenuItem_Click(object sender, EventArgs e) { if (chartForm == null) { chartForm = new StockChartForm(); this.IsMdiContainer = true; chartForm.MdiParent = this; MainPanel.Visible = false; chartForm.FormClosed += ChartForm_FormClosed; chartForm.Show(); } else { chartForm.Activate(); } }
private void ChartForm_FormClosed(object sender, FormClosedEventArgs e) { chartForm = null; }