for DaHongMen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

31 lines
776 B

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace FourComponentWeightClient
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
public App()
{
//处理程序中未捕获的异常
DispatcherUnhandledException += App_DispatcherUnhandledException;
}
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
var msg = e.Exception.Message;
#if DEBUG
msg = e.Exception.ToString();
#endif
MessageBox.Show(msg, "错误", MessageBoxButton.OK, MessageBoxImage.Error);
e.Handled = true;
}
}
}