void FrmOMS_FormClosed(object sender, FormClosedEventArgs e) { if (sender is frmDataCenter) { frmDataCenter = null; } }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { if (frmDataCenter == null) { frmDataCenter = new frmDataCenter(); frmDataCenter.FormClosed += new FormClosedEventHandler(FrmOMS_FormClosed); } if (frmDataCenter == null) { frmDataCenter = new frmDataCenter(); } frmDataCenter.Show(this.dockPanel2); }