private void setElectionDateToolStripMenuItem_Click(object sender, EventArgs e) { if (_addNew == null) { _addNew = new FrmAddNewElection { MdiParent = this }; _addNew.FormClosed += _addNew_FormClosed; _addNew.Show(); _addNew.StyleManager = StyleManager; } else { _addNew.Activate(); _addNew.WindowState = FormWindowState.Normal; } }
private void _addNew_FormClosed(object sender, FormClosedEventArgs e) { _addNew = null; }