wpf 客户端新增日志记录,网络组件优化

This commit is contained in:
dathlin
2017-09-18 22:05:49 +08:00
parent 57f5eb83a6
commit 379d38d0eb
5 changed files with 51 additions and 7 deletions

View File

@@ -1,4 +1,6 @@
using System;
using ClientsLibrary;
using HslCommunication.LogNet;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
@@ -25,6 +27,8 @@ namespace 软件系统客户端Wpf
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// 处理异常
UserClient.LogNet = new LogNetDateTime(AppDomain.CurrentDomain.BaseDirectory + @"\Logs", GenerateMode.ByEveryDay);
//捕获未处理的异常
AppDomain.CurrentDomain.UnhandledException += ClientsLibrary.UserClient.CurrentDomain_UnhandledException;