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

@@ -47,9 +47,6 @@ namespace 软件系统客户端模版
public FormMainWindow()
{
InitializeComponent();
// 处理异常
UserClient.LogNet = new LogNetDateTime(Application.StartupPath + @"\Logs", GenerateMode.ByEveryDay);
}
#region

View File

@@ -1,4 +1,6 @@
using System;
using ClientsLibrary;
using HslCommunication.LogNet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@@ -20,6 +22,8 @@ namespace 软件系统客户端模版
[STAThread]
static void Main()
{
// 处理异常
UserClient.LogNet = new LogNetDateTime(Application.StartupPath + @"\Logs", GenerateMode.ByEveryDay);
// 捕获未处理的异常
AppDomain.CurrentDomain.UnhandledException += ClientsLibrary.UserClient.CurrentDomain_UnhandledException;
//=====================================================================