private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { try { _actHook.Stop(); //Stop the user activity watcher. } catch (Exception) { } SystemEvents.PowerModeChanged -= System_PowerModeChanged; }
private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { // Get rid of the keyboard hook in case of a crash, otherwise input freezes up system wide until Artemis is gone InputHook.Stop(); if (DoHandle) { GetArtemisExceptionViewer(e.Exception).ShowDialog(); e.Handled = true; } else { GetArtemisExceptionViewer(e.Exception).ShowDialog(); e.Handled = false; } }
private void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs) { // Get rid of the keyboard hook in case of a crash, otherwise input freezes up system wide until Artemis is gone InputHook.Stop(); }