From f08871fe7d148d667f2f11f80f64de71a0d9504c Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 15 六月 2026 18:19:37 +0800
Subject: [PATCH] 优化标准老化界面

---
 Plugin.CurrentSensorControl/BurnInOven.xaml.cs |   35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/Plugin.CurrentSensorControl/BurnInOven.xaml.cs b/Plugin.CurrentSensorControl/BurnInOven.xaml.cs
index 795e171..10b2b6c 100644
--- a/Plugin.CurrentSensorControl/BurnInOven.xaml.cs
+++ b/Plugin.CurrentSensorControl/BurnInOven.xaml.cs
@@ -1,10 +1,8 @@
 锘縰sing CommunityToolkit.Mvvm.ComponentModel;
-using ConnectionUtil;
 using HslCommunication.Profinet.Siemens;
+using PLCHelper;
 using Plugin.CurrentSensorControl.Entity;
-using System.Drawing;
 using System.Windows.Controls;
-using System.Windows.Markup;
 
 namespace Plugin.CurrentSensorControl
 {
@@ -25,6 +23,9 @@
         private string req;
         [ObservableProperty]
         private string reqStatus;
+
+        [ObservableProperty]
+        private string coolerStatus;
 
         [ObservableProperty]
         private string setTemp;
@@ -161,8 +162,26 @@
                         {
                             AvgTemp = val;
                         }
+                        else if (data == "_CoolerStatus")
+                        {
+                            if (val == "1")
+                            {
+                                CoolerStatus = "杩愭按";
+                            }
+                            else if (val == "2")
+                            {
+                                CoolerStatus = "鍚规按";
+                            }
+                            else if (val == "3")
+                            {
+                                CoolerStatus = "娴嬪帇";
+                            }
+                            else if (val == "0")
+                            {
+                                CoolerStatus = "鍋滄";
+                            }
+                        }
                     }
-
 
                     //;
                     //if (api.DoFctReadSingle(name, out string val, out _))
@@ -229,5 +248,13 @@
             S7Context.WriteData(api, name, short.Parse(btn.Tag.ToString()));
             //api.DoFctWriteSingle(name, btn.Tag.ToString(), out string errMsg);
         }
+
+        private void Button_Click2(object sender, System.Windows.RoutedEventArgs e)
+        {
+            var btn = sender as Button;
+            string name = $"Oven{ovenIndex + 1}_CoolerStatus";
+            S7Context.WriteData(api, name, ushort.Parse(btn.Tag.ToString()));
+            //api.DoFctWriteSingle(name, btn.Tag.ToString(), out string errMsg);
+        }
     }
 }

--
Gitblit v1.9.1