private void castVoteToolStripMenuItem1_Click(object sender, EventArgs e) { if (_election == null) { _election = new FrmElectionModule { MdiParent = this }; _election.FormClosed += _election_FormClosed; _election.Show(); _election.StyleManager = StyleManager; } else { _election.Activate(); _election.WindowState = FormWindowState.Normal; } }
private void _election_FormClosed(object sender, FormClosedEventArgs e) { _election = null; }