private void statisticsToolStripMenuItem_Click(object sender, EventArgs e) { if (_stats == null) { _stats = new FrmVoteStats { MdiParent = this }; _stats.FormClosed += _stats_FormClosed; _stats.Show(); _stats.StyleManager = StyleManager; } else { _stats.Activate(); _stats.WindowState = FormWindowState.Normal; } }
private void _stats_FormClosed(object sender, FormClosedEventArgs e) { _stats = null; }