private void أجهزةالمغسلةToolStripMenuItem_Click(object sender, EventArgs e) { if (dvc == null) { dvc = new WM_device(); dvc.MdiParent = this; dvc.FormClosed += new FormClosedEventHandler(dvc_FormClosed); dvc.Show(); } else { dvc.Activate(); } }
void dvc_FormClosed(object sender, FormClosedEventArgs e) { dvc = null; //throw new NotImplementedException(); }