From c135877a65244706008b6215b2734bb37bbfb7f4 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 20 七月 2023 08:59:09 +0800 Subject: [PATCH] Merge branch 'Dev-1.9' 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 8b698be..db4c83f 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs @@ -468,12 +468,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) => { @@ -490,7 +485,7 @@ string set_temp_value = stateStr.Replace(unit, ""); //鏁版嵁灏佽 AddDictionary(keyVlaue, set_temp_value); - }, min,max, unit); + }, min, max, unit); }; ///妯″紡鐐瑰嚮浜嬩欢 @@ -579,11 +574,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