private void StripMenuItem_Plugins_Click(object sender, EventArgs e) { if (fd == null) // open single form copy { fd = new Form_Plugins(); fd.FormClosed += new FormClosedEventHandler(Fd_FormClosed); fd.Show(this); } else { fd.Activate(); // activate form if it is already opened } }
private void Fd_FormClosed(object sender, FormClosedEventArgs e) { log.Trace("Form {0} closed.", fd.Text); fd = null; // set open form flag to null }