void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     if (System.Diagnostics.Debugger.IsAttached)
     {
         System.Diagnostics.Debugger.Break();
     }
     else
     {
         Utilities.OnException(e.Exception);
     }
 }
 void OnUnobservedTaskException(object sender, System.Threading.Tasks.UnobservedTaskExceptionEventArgs e)
 {
     if (System.Diagnostics.Debugger.IsAttached)
     {
         System.Diagnostics.Debugger.Break();
     }
     else
     {
         Utilities.OnException(e.Exception);
     }
 }