diff --git a/SlnMesnac.Business/ProdMgmtBusiness.cs b/SlnMesnac.Business/ProdMgmtBusiness.cs index b971438..457c99d 100644 --- a/SlnMesnac.Business/ProdMgmtBusiness.cs +++ b/SlnMesnac.Business/ProdMgmtBusiness.cs @@ -76,12 +76,12 @@ namespace SlnMesnac.Business _basePalletInfoService = basePalletInfoService; _baseRealTaskService = baseRealTaskService; _palletTasks = palletTasks; - // testTran(); + // testTran(); } public async void testTran() { - + //TcpClient tcpClient = new TcpClient(); //var waitClient = tcpClient.CreateWaitingClient(new WaitingOptions() @@ -93,7 +93,7 @@ namespace SlnMesnac.Business //}); //tcpClient.Setup(new TouchSocketConfig().SetRemoteIPHost($"192.168.2.51:3000")); //tcpClient.Connect(); - // byte[] reciveBuffer = await waitClient.SendThenReturnAsync(pMessagePack.m_pData, timeout); + // byte[] reciveBuffer = await waitClient.SendThenReturnAsync(pMessagePack.m_pData, timeout); string aaa =await ReadEpcStrByRfidKeyAsync("test"); // ReadEpcStrByRfidKey("test", out string epcStr); Console.WriteLine(aaa); diff --git a/SlnMesnac.WPF/App.xaml b/SlnMesnac.WPF/App.xaml index 11aebee..efc4d7f 100644 --- a/SlnMesnac.WPF/App.xaml +++ b/SlnMesnac.WPF/App.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:SlnMesnac.WPF" - StartupUri="MainWindow.xaml"> + StartupUri="MainWindow.xaml" DispatcherUnhandledException="Application_DispatcherUnhandledException"> diff --git a/SlnMesnac.WPF/App.xaml.cs b/SlnMesnac.WPF/App.xaml.cs index 4f46242..b2617c0 100644 --- a/SlnMesnac.WPF/App.xaml.cs +++ b/SlnMesnac.WPF/App.xaml.cs @@ -63,7 +63,15 @@ namespace SlnMesnac.WPF } - + private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) + { + //记录日志 + Console.WriteLine(e.Exception.Message); + } + + + + /// /// CreateHostBuilder diff --git a/SlnMesnac.WPF/Page/DevMonitorPage.xaml b/SlnMesnac.WPF/Page/DevMonitorPage.xaml index b44d042..2a5795c 100644 --- a/SlnMesnac.WPF/Page/DevMonitorPage.xaml +++ b/SlnMesnac.WPF/Page/DevMonitorPage.xaml @@ -263,10 +263,10 @@ - +