From 6298598b5b957e5ab6fde50b161afd205f9a8b2a Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 19 七月 2023 13:56:51 +0800 Subject: [PATCH] 2023年07月19日13:56:19 --- 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