Files
hk4e-gm-clone/csharp/App.xaml.cs
T

17 lines
396 B
C#

using System.Windows;
namespace Hk4eGm;
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
DispatcherUnhandledException += (_, args) =>
{
MessageBox.Show(args.Exception.Message, "错误", MessageBoxButton.OK, MessageBoxImage.Error);
args.Handled = true;
};
}
}