private void OnClosed(object sender, EventArgs e) { if (Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) { WindowsHelper.RestartCurrentApplication(); } else { Application.Current.Shutdown(); } }