From 9c4967cd8843ac7ed65ee64195bcf69c592c4a20 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 07 六月 2023 15:57:36 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' into Dev-Wxr-1.8.1

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index b1c6ab8..2104754 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -331,6 +331,9 @@
                         {
                             SwitchViewMethod(device, acSwitchVie.btnState, 2);
                         };
+                        int min = device.GetAttribute("set_temp") == null ? 16 : device.GetAttribute("set_temp").min;
+                        int max = device.GetAttribute("set_temp") == null ? 32 : device.GetAttribute("set_temp").max;
+                        string unit = device.GetAttribute("temperature_type") == null ? "掳" : device.GetAttribute("temperature_type").state;
                         ///娓╁害鐐瑰嚮浜嬩欢
                         temperatureView.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
@@ -344,11 +347,10 @@
                                 //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
                                 string keyVlaue = "set_temp";
                                 selectedState = device.spk + "_" + keyVlaue;
-                                string set_temp_value = stateStr.Replace("鈩�", "");
+                                string set_temp_value = stateStr.Replace(unit, "");
                                 //鏁版嵁灏佽
                                 AddDictionary(keyVlaue, set_temp_value);
-                            });
-
+                            }, min,max, unit);
 
                         };
                         ///妯″紡鐐瑰嚮浜嬩欢
@@ -435,6 +437,9 @@
                         ///娓╁害鐐瑰嚮浜嬩欢
                         temperatureView.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
+                            int min = device.GetAttribute("set_temp") == null ? 16 : device.GetAttribute("set_temp").min;
+                            int max = device.GetAttribute("set_temp") == null ? 32 : device.GetAttribute("set_temp").max;
+                            string unit = device.GetAttribute("temperature_type") == null ? "掳" : device.GetAttribute("temperature_type").state;
                             string tempValue = temperatureView.btnState.Text;
                             LogicView.TemperatureView tempView = new LogicView.TemperatureView();
                             tempView.FLayoutView(this, tempValue, (stateStr) =>
@@ -444,11 +449,11 @@
                                 //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
                                 string keyVlaue = "set_temp";
                                 selectedState = device.spk + "_" + keyVlaue;
-                                string set_temp_value = stateStr.Replace("鈩�", "");
+                                string set_temp_value = stateStr.Replace(unit, "");
                                 //鏁版嵁灏佽
                                 AddDictionary(keyVlaue, set_temp_value);
 
-                            });
+                            }, min, max, unit);
 
                         };
                         ///妯″紡鐐瑰嚮浜嬩欢

--
Gitblit v1.8.0