Пример #1
0
    private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {
        try
        {
            _actHook.Stop(); //Stop the user activity watcher.
        }
        catch (Exception) { }

        SystemEvents.PowerModeChanged -= System_PowerModeChanged;
    }
Пример #2
0
        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;
            }
        }
Пример #3
0
 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();
 }