public void NormalExecute() { if (MultipleInstanceAllow == false && w != null) { MessageBox.Show("Multiple instance not allowed."); w.Activate(); return; } w = new wMain(AppObjects); w.Closed += new EventHandler(w_Closed); w.Owner = AppObjects.wMain; w.Show(); }
private void w_Closed(object sender, EventArgs e) { w = null; }