From d3189eaa6be7c70ed5ac783efe68f43211a90d27 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 20 七月 2023 08:58:56 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' of http://172.16.1.23:6688/r/~wxr/OnPro into Dev-Branch

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

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index e828e1a..3518292 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -388,12 +388,7 @@
                         };
                         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;
-                        if (string.IsNullOrEmpty(unit))
-                        {
-                            //璋冭瘯杞欢鏈夌┖鑳戒笂浼犱负绌�
-                            unit = "鈩�";
-                        }
+                        string unit = InpOrOutLogicMethod.Current.GetTemperatureUnit(device);
                         ///娓╁害鐐瑰嚮浜嬩欢
                         temperatureView.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
@@ -410,7 +405,7 @@
                                 string set_temp_value = stateStr.Replace(unit, "");
                                 //鏁版嵁灏佽
                                 AddDictionary(keyVlaue, set_temp_value);
-                            }, min,max, unit);
+                            }, min, max, unit);
 
                         };
                         ///妯″紡鐐瑰嚮浜嬩欢
@@ -499,11 +494,7 @@
                         {
                             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;
-                            if (string.IsNullOrEmpty(unit)) {
-                                //璋冭瘯杞欢鏈夌┖鑳戒笂浼犱负绌�
-                                unit = "鈩�";
-                            }
+                            string unit = InpOrOutLogicMethod.Current.GetTemperatureUnit(device);
                             string tempValue = temperatureView.btnState.Text;
                             LogicView.TemperatureView tempView = new LogicView.TemperatureView();
                             tempView.FLayoutView(this, tempValue, (stateStr) =>

--
Gitblit v1.8.0