public void ShowSettingsWindow() { if (window == null) { window = new NotificationSettingsWindow(); window.Closed += window_Closed; Controller.ShowWindow(window); } else { window.Focus(); } }
void window_Closed(object sender, EventArgs e) { window.Closed -= window_Closed; window = null; }