GUI: Added checkbox to enable/disable "legacy" compatibility mode.
[slunkcrypt.git] / gui / App.xaml.cs
blob6dd1f719f6e66ccd9c84ee9f93a372f062b7a6ac
1 /******************************************************************************/
2 /* SlunkCrypt, by LoRd_MuldeR <MuldeR2@GMX.de> */
3 /* This work has been released under the CC0 1.0 Universal license! */
4 /******************************************************************************/
6 using System;
7 using System.Windows;
9 namespace com.muldersoft.slunkcrypt.gui
11 public partial class App : Application
13 public App()
15 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionHandler);
18 private static void ExceptionHandler(object sender, UnhandledExceptionEventArgs args)
20 Exception exception;
21 if (!ReferenceEquals(exception = args.ExceptionObject as Exception, null))
23 MessageBox.Show("Unhandeled exception error:\n\n" + exception.Message, exception.GetType().Name, MessageBoxButton.OK, MessageBoxImage.Error);
25 Environment.Exit(-1);
28 protected void FrameworkElement_PreviewUserInputEvent(object sender, RoutedEventArgs e)
30 FrameworkElement element = sender as FrameworkElement;
31 if (!ReferenceEquals(element, null))
33 if (!element.IsHitTestVisible)
35 e.Handled = true;