mirror of
https://github.com/luanslimadev/Wand-Enhancer.git
synced 2026-09-04 12:13:17 +00:00
added runtime patcher, added MemoryUtils, fixes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using WeModPatcher.Core;
|
||||
using WeModPatcher.View.MainWindow;
|
||||
using MessageBox = System.Windows.Forms.MessageBox;
|
||||
|
||||
namespace WeModPatcher
|
||||
@@ -12,21 +14,7 @@ namespace WeModPatcher
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
|
||||
TaskScheduler.UnobservedTaskException += OnUnobservedTaskException;
|
||||
base.OnStartup(e);
|
||||
}
|
||||
|
||||
private void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
|
||||
{
|
||||
MessageBox.Show(e.ToString());
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
private void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
MessageBox.Show(e.ToString());
|
||||
Shutdown();
|
||||
this.MainWindow.Show();
|
||||
}
|
||||
|
||||
public new static void Shutdown()
|
||||
|
||||
Reference in New Issue
Block a user