From f7063b6fb7b46e3612afb1c6bb426c94fb92593d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 10 一月 2023 14:44:32 +0800 Subject: [PATCH] 设备加载优化 --- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs index 3b3a26d..1289164 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs @@ -129,7 +129,13 @@ } else { - btnTemp.Text = setTempAttr.curValue.ToString(); + if (setTempAttr.curValue.ToString().Contains(".")) + { + btnTemp.Text = setTempAttr.curValue.ToString().Split(".")[0]; + }else + { + btnTemp.Text = setTempAttr.curValue.ToString(); + } } btnTemp.Width = btnTemp.GetTextWidth(); FrameWhiteCentet1.AddChidren(btnTemp); @@ -970,12 +976,16 @@ if (device.trait_on_off.curValue.ToString() == "on") { btnSwitch.IsSelected = true; - setTempBar.IsOffline = false; + //setTempBar.IsOffline = false; + //setTempBar.Enable = true; + //setTempBar.ProgressBarColor = CSS_Color.MainColor; } else { btnSwitch.IsBold = false; - setTempBar.IsOffline = true; + //setTempBar.IsOffline = true; + //setTempBar.Enable = false; + //setTempBar.ProgressBarColor = CSS_Color.DividingLineColor; } System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString()); @@ -1031,7 +1041,9 @@ if (device.trait_on_off.curValue.ToString() == "on") { btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true; - setTempBar.IsOffline = false; + setTempBar.Enable = true; + setTempBar.ProgressBarColor = CSS_Color.MainColor; + btnSwitch.IsSelected = true; if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") { @@ -1045,7 +1057,9 @@ else { btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false; - setTempBar.IsOffline = true; + setTempBar.Enable = false; + setTempBar.ProgressBarColor = CSS_Color.DividingLineColor; + btnSwitch.IsSelected = false; setTempBar.IsClickable = false; } -- Gitblit v1.8.0