Commit 6d351a83 authored by 潘栩锋's avatar 潘栩锋 🚴

1.修复 App() 内的 nlog 记录出差

2.修复 FLY.Thick.Blowing.UI.Fix.Client.SysParam 属性重复
parent 660bd5bf
...@@ -20,7 +20,7 @@ namespace FLY.FeedbackRenZiJia.UI.Server ...@@ -20,7 +20,7 @@ namespace FLY.FeedbackRenZiJia.UI.Server
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家", "异常,联系厂家",
......
...@@ -21,7 +21,7 @@ namespace FLY.IBC.UI.Server ...@@ -21,7 +21,7 @@ namespace FLY.IBC.UI.Server
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家", "异常,联系厂家",
......
...@@ -21,14 +21,13 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -21,14 +21,13 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject,"AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家", "异常,联系厂家",
MessageBoxButton.OK, MessageBoxImage.Error); MessageBoxButton.OK, MessageBoxImage.Error);
}; };
} }
} }
} }
...@@ -13,34 +13,11 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -13,34 +13,11 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
{ {
public class SysParam : ThickTcpUiInWindow.SysParam public class SysParam : ThickTcpUiInWindow.SysParam
{ {
#region 数据文件需要保存的数据项
public int WindowSize { get; set; } = 30;
/// <summary>
/// USB 继电器 串口地址
/// </summary>
public string LCUS1_PortName { get; set; } = "COM1";
/// <summary>
/// 使能USB 继电器
/// </summary>
public bool EnableLCUS1 { get; set; }
#endregion
public SysParam() public SysParam()
{ {
} }
public override string[] GetSavePropertyNames()
{
List<string> propertynames = new List<string>();
propertynames.AddRange(base.GetSavePropertyNames());
propertynames.AddRange(new string[]{
"WindowSize",
"LCUS1_PortName",
"EnableLCUS1"
});
return propertynames.ToArray();
}
} }
} }
...@@ -21,7 +21,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Server ...@@ -21,7 +21,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Server
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
......
...@@ -23,7 +23,7 @@ namespace FLY.Thick.BlowingScan.UI.Scan.Client ...@@ -23,7 +23,7 @@ namespace FLY.Thick.BlowingScan.UI.Scan.Client
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家", "异常,联系厂家",
......
...@@ -23,7 +23,7 @@ namespace FLY.Thick.BlowingScan.UI.Scan.Server ...@@ -23,7 +23,7 @@ namespace FLY.Thick.BlowingScan.UI.Scan.Server
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家", "异常,联系厂家",
......
...@@ -21,7 +21,7 @@ namespace FLY.Weight.UI.Server ...@@ -21,7 +21,7 @@ namespace FLY.Weight.UI.Server
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家", "异常,联系厂家",
......
...@@ -20,7 +20,7 @@ namespace FLY.Winder.UI.Server ...@@ -20,7 +20,7 @@ namespace FLY.Winder.UI.Server
AppDomain.CurrentDomain.UnhandledException += (s, e) => AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{ {
log.Error(e); log.Error((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException");
string err = e.ExceptionObject.ToString(); string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err, MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment