diff --git a/App.config b/App.config
index 0a2370c..f42b1ba 100644
--- a/App.config
+++ b/App.config
@@ -2,15 +2,14 @@
-
-
-
+
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/Window2.xaml b/Window2.xaml
index 0414efc..33783d3 100644
--- a/Window2.xaml
+++ b/Window2.xaml
@@ -128,7 +128,7 @@
-
+
diff --git a/Window3.xaml b/Window3.xaml
index 7f8787f..5bc640c 100644
--- a/Window3.xaml
+++ b/Window3.xaml
@@ -168,15 +168,15 @@
-
+
-
+
-
+
-
+
diff --git a/Window3.xaml.cs b/Window3.xaml.cs
index 995e355..0153794 100644
--- a/Window3.xaml.cs
+++ b/Window3.xaml.cs
@@ -1026,7 +1026,7 @@ namespace ShanghaiEnvironmentalTechnology
string invalidData = currentLanguage == "en-US" ? "Invalid flow or pressure value" : "流量或压力值格式不正确,请检查输入";
string noData = currentLanguage == "en-US" ? "No data to export" : "防室息阀压力表中无数据,无法导出";
string exportSuccess = currentLanguage == "en-US" ? "Export success" : "数据已成功导出到Excel";
- string exportFail = currentLanguage == "en-US" ? "Export failed" : "Excel导出失败,请检查文件是否被占用";
+ //string exportFail = currentLanguage == "en-US" ? "Export failed" : "Excel导出失败,请检查文件是否被占用";
if (!IsModbusConnected())
{
@@ -1065,7 +1065,7 @@ namespace ShanghaiEnvironmentalTechnology
}
else
{
- MessageBox.Show(exportFail, currentLanguage == "en-US" ? "Error" : "错误", MessageBoxButton.OK, MessageBoxImage.Error);
+ //MessageBox.Show(exportFail, currentLanguage == "en-US" ? "Error" : "错误", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
diff --git a/Window4.xaml b/Window4.xaml
index 8cafdb2..234feae 100644
--- a/Window4.xaml
+++ b/Window4.xaml
@@ -299,7 +299,7 @@
-
+
diff --git a/Window4.xaml.cs b/Window4.xaml.cs
index 13db804..5504311 100644
--- a/Window4.xaml.cs
+++ b/Window4.xaml.cs
@@ -687,6 +687,12 @@ namespace ShanghaiEnvironmentalTechnology
{
string lang = ConfigurationManager.AppSettings["Language"] ?? "zh-CN";
+ if (_modbusMaster == null)
+ {
+ // ShowError(lang == "en-US" ? "Modbus TCP not connected" : "Modbus TCP 未连接");
+ return;
+ }
+
if (!IsModbusConnected())
{
InitializeModbusTcp();