private void cmdNew_Click(object sender, RoutedEventArgs e) { frmActorEdit frm = null; foreach (Window win in Application.Current.Windows) { if (win is frmActorEdit) { win.Activate(); return; } } frm = new frmActorEdit(null); frm.EndAtomObjectsEditEvent += frm_EndAtomObjectsEditEvent; frm.Owner = this; frm.Show(); }