From f29a58428371b9c634d79ec69ada3dfeb7e06b1d Mon Sep 17 00:00:00 2001 From: liuwf Date: Mon, 23 Sep 2024 15:36:15 +0800 Subject: [PATCH] . --- SlnMesnac.Plc/Factory/SiemensFactory.cs | 2 +- SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs | 8 ++++++-- SlnMesnac.WPF/Page/Window/InputDialogWindow.xaml.cs | 6 +----- SlnMesnac.WPF/appsettings.json | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/SlnMesnac.Plc/Factory/SiemensFactory.cs b/SlnMesnac.Plc/Factory/SiemensFactory.cs index 1641769..6571c75 100644 --- a/SlnMesnac.Plc/Factory/SiemensFactory.cs +++ b/SlnMesnac.Plc/Factory/SiemensFactory.cs @@ -70,7 +70,7 @@ namespace SlnMesnac.Plc.Factory throw new InvalidOperationException($"西门子S系列PLC连接异常:{ex.Message}"); } } - + /// /// 断开连接 /// diff --git a/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs b/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs index c9ec049..b56d7f0 100644 --- a/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs +++ b/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs @@ -176,8 +176,12 @@ namespace SlnMesnac.WPF.Page } else { - _logger.LogError($"设备监听启动失败;PLC连接失败!"); - Thread.Sleep(1000 * 30); + Application.Current.Dispatcher.Invoke(() => + { + Msg.MsgShow($"设备监听失败;PLC连接失败!", 2, 3); + }); + + Thread.Sleep(1000 * 20); } diff --git a/SlnMesnac.WPF/Page/Window/InputDialogWindow.xaml.cs b/SlnMesnac.WPF/Page/Window/InputDialogWindow.xaml.cs index a83b265..94822be 100644 --- a/SlnMesnac.WPF/Page/Window/InputDialogWindow.xaml.cs +++ b/SlnMesnac.WPF/Page/Window/InputDialogWindow.xaml.cs @@ -48,12 +48,8 @@ namespace SlnMesnac.WPF.Page recipeManageCache.MinBufferWeight = minValue; } else - { - + { Msg.MsgShow("请输入合理的重量", 0, 5); - - - } } } diff --git a/SlnMesnac.WPF/appsettings.json b/SlnMesnac.WPF/appsettings.json index 8a9010f..6ab59f1 100644 --- a/SlnMesnac.WPF/appsettings.json +++ b/SlnMesnac.WPF/appsettings.json @@ -14,8 +14,8 @@ { "configId": "mes", "dbType": 0, - "connStr": "Data Source=175.27.215.92;Port=3306;Initial Catalog=hwjy-cloud;uid=root;pwd=haiwei@123;Charset=utf8mb4;SslMode=none" - // "connStr": "Data Source=172.16.12.100;Port=3306;Initial Catalog=hwjy-cloud;uid=root;pwd=JyhbRk@123456;Charset=utf8mb4;SslMode=none" + // "connStr": "Data Source=175.27.215.92;Port=3306;Initial Catalog=hwjy-cloud;uid=root;pwd=haiwei@123;Charset=utf8mb4;SslMode=none" + "connStr": "Data Source=172.16.12.100;Port=3306;Initial Catalog=hwjy-cloud;uid=root;pwd=JyhbRk@123456;Charset=utf8mb4;SslMode=none" }, { "configId": "local",