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;
|
|
}
|
|
}
|
|
}
|