Files
petwash/PetWashControl/App.xaml.cs

26 lines
710 B
C#
Raw Normal View History

2026-02-25 10:46:51 +08:00
using System.Configuration;
using System.Data;
using System.Windows;
namespace PetWashControl
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
2026-02-27 16:56:18 +08:00
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// 全局异常处理
this.DispatcherUnhandledException += (s, args) =>
{
MessageBox.Show($"应用程序错误:\n{args.Exception.Message}\n\n{args.Exception.StackTrace}",
"错误", MessageBoxButton.OK, MessageBoxImage.Error);
args.Handled = true;
};
}
2026-02-25 10:46:51 +08:00
}
}