用途:如题
#region - 注册全局异常 - static StartWindow() { /// <summary> 注册全局异常 </summary> System.Windows.Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException; } /// <summary> 补货全局异常 </summary> static void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { System.Windows.MessageBox.Show(e.Exception.Message); e.Handled = true; } #endregion