added runtime patcher, added MemoryUtils, fixes

This commit is contained in:
kitbyte
2025-03-24 14:51:58 +02:00
parent 123307aed7
commit d3ff13a528
33 changed files with 1294 additions and 287 deletions
+3 -15
View File
@@ -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()