private void CurrentDomain_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
        {
            Exception exc = e.ExceptionObject as Exception;

            ClientLog.WriteLog(exc.Message + Environment.NewLine + exc.StackTrace);
            MessageBox.Show("程序异常", "程序异常", MessageBoxButton.OK, MessageBoxImage.Error);
        }
 private void Current_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e)
 {
     ClientLog.WriteLog(e.Exception.Message + Environment.NewLine + e.Exception.StackTrace);
     MessageBox.Show("程序异常", "程序异常", MessageBoxButton.OK, MessageBoxImage.Error);
     e.Handled = true;
 }