diff --git a/Window1.xaml b/Window1.xaml
index 89dff52..ea44f3c 100644
--- a/Window1.xaml
+++ b/Window1.xaml
@@ -94,7 +94,7 @@
InputScope="Number" PreviewTextInput="SettingPaTextBox_PreviewTextInput" />
-
+
@@ -102,7 +102,7 @@
-
+
diff --git a/Window1.xaml.cs b/Window1.xaml.cs
index 2aa11e9..b279b45 100644
--- a/Window1.xaml.cs
+++ b/Window1.xaml.cs
@@ -199,11 +199,15 @@ namespace ShanghaiEnvironmentalTechnology
{
if (isTestRunning)
{
+ btnsetting.IsEnabled = false;
+ btnjiaozhun.IsEnabled = false;
TestStartButton.Content = testStartButtonText;
TestStartButton.Foreground = Brushes.LightGreen;
}
else
{
+ btnsetting.IsEnabled = true;
+ btnjiaozhun.IsEnabled = true;
TestStartButton.Content = ButtonStatus;
TestStartButton.Foreground = Brushes.White;
}
diff --git a/Window2.xaml b/Window2.xaml
index 7b93f11..0414efc 100644
--- a/Window2.xaml
+++ b/Window2.xaml
@@ -96,7 +96,7 @@
-
+
@@ -114,7 +114,7 @@
-
+
@@ -132,7 +132,7 @@
-
+
diff --git a/Window2.xaml.cs b/Window2.xaml.cs
index fdbba49..f6b5332 100644
--- a/Window2.xaml.cs
+++ b/Window2.xaml.cs
@@ -260,11 +260,19 @@ namespace ShanghaiEnvironmentalTechnology
{
if (isTestRunning)
{
+ btnjiaozhun.IsEnabled = false;
+ btnlianjiekou.IsEnabled = false;
+ btnsetting.IsEnabled = false;
+
TestStartButton.Content = testStartButtonText;
TestStartButton.Foreground = Brushes.LightGreen;
}
else
{
+ btnjiaozhun.IsEnabled = true;
+ btnlianjiekou.IsEnabled = true;
+ btnsetting.IsEnabled = true;
+
TestStartButton.Content = ButtonStatus;
TestStartButton.Foreground = Brushes.White;
}
diff --git a/Window3.xaml b/Window3.xaml
index e413056..7f8787f 100644
--- a/Window3.xaml
+++ b/Window3.xaml
@@ -152,7 +152,7 @@
InputScope="Number"
PreviewTextInput="SettingPaTextBox_PreviewTextInput"/>
-
+
@@ -163,7 +163,7 @@
/>
-
+
@@ -192,7 +192,7 @@
-
+
diff --git a/Window3.xaml.cs b/Window3.xaml.cs
index 094af35..995e355 100644
--- a/Window3.xaml.cs
+++ b/Window3.xaml.cs
@@ -138,11 +138,20 @@ namespace ShanghaiEnvironmentalTechnology
{
if (isTestRunning)
{
+
+ btnsetting.IsEnabled = false;
+ btnjiaozhun.IsEnabled = false;
+ btnsetting2.IsEnabled = false;
+
TestStartButton.Content = testStartButtonText;
TestStartButton.Foreground = Brushes.LightGreen;
}
else
{
+ btnsetting.IsEnabled = true;
+ btnjiaozhun.IsEnabled = true;
+ btnsetting2.IsEnabled = true;
+
TestStartButton.Content = ButtonStatus;
TestStartButton.Foreground = Brushes.White;
}
diff --git a/Window4.xaml b/Window4.xaml
index 70470bc..8cafdb2 100644
--- a/Window4.xaml
+++ b/Window4.xaml
@@ -199,7 +199,7 @@
-
-
-
-
-
-
-
-
+
-
+
-
+
@@ -183,7 +183,7 @@ IsReadOnly="True"
-
+
@@ -192,7 +192,7 @@ IsReadOnly="True"
-
+
diff --git a/Window6.xaml.cs b/Window6.xaml.cs
index d411182..46a557d 100644
--- a/Window6.xaml.cs
+++ b/Window6.xaml.cs
@@ -113,12 +113,6 @@ namespace ShanghaiEnvironmentalTechnology
// 实时读取定时器(1个定时器管理5个参数)
private System.Timers.Timer _paramReadTimer;
- // 下位机寄存器地址(根据实际PLC地址修改)
- //private readonly ushort _handmovementAddr = 0x0300; // 手动速度
- //private readonly ushort _moistureAddr = 0x0301; // 潮气量系数
- //private readonly ushort _outFlowAddr = 0x0302; // 呼气流量系数
- //private readonly ushort _inFlowAddr = 0x0303; // 吸气流量系数
- //private readonly ushort _pressAddr = 0x0304; // 压力系数
#endregion
@@ -133,11 +127,25 @@ namespace ShanghaiEnvironmentalTechnology
{
if (isTestRunning)
{
+
+ btn1.IsEnabled = false;
+ btn2.IsEnabled = false;
+ btn3.IsEnabled = false;
+ btn4.IsEnabled = false;
+ btn5.IsEnabled = false;
+
ResetBtn.Content = _lang == "en-US" ? "Reset Success" : "复位成功";
ResetBtn.Foreground = Brushes.LightGreen;
}
else
{
+ btn1.IsEnabled = true;
+ btn2.IsEnabled = true;
+ btn3.IsEnabled = true;
+ btn4.IsEnabled = true;
+ btn5.IsEnabled = true;
+
+
ResetBtn.Content = _lang == "en-US" ? "Reset" : "复位";
ResetBtn.Foreground = Brushes.White;
}
@@ -604,7 +612,7 @@ namespace ShanghaiEnvironmentalTechnology
}
finally
{
-
+
}
}
@@ -617,7 +625,7 @@ namespace ShanghaiEnvironmentalTechnology
{
if (!IsModbusConnected())
{
- // ShowError("Modbus TCP 未连接");
+ // ShowError("Modbus TCP 未连接");
return;
}
try