void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { Global.Quit(); }
void MainWindow_Closed(object sender, EventArgs e) { Global.MainWindow = null; Global.Quit(); }
protected override void OnExit(ExitEventArgs e) { base.OnExit(e); Global.Quit(); }