From 1d1cad99a27c9f644c84eb3d376c70bd30a55879 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 10 三月 2021 18:02:13 +0800
Subject: [PATCH] 2021-3-10-1

---
 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index ebe9a20..4727b80 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -102,10 +102,10 @@
 
                                 break;
                         }
-                        var powerLowTipAttr = function.status.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+                        var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
                         if (powerLowTipAttr != null)
                         {
-                            if (powerLowTipAttr.value.ToLower() == "low")
+                            if (powerLowTipAttr.state.ToLower() == "low")
                             {
                                 Button btnTipPowerLow = new Button()
                                 {
@@ -331,7 +331,7 @@
                         ProgressTextColor = CSS_Color.FirstLevelTitleColor,
                         ProgressTextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
                         MaxValue = 100,
-                        Progress = (function as Light).brightness,
+                        Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.BatteryState)),
                         Tag = function.sid + "_DimmerBar",
                         SeekBarPadding = Application.GetRealWidth(20),
                     };
@@ -399,7 +399,7 @@
                 IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) != "0"
             };
             bodyDiv.AddChidren(btnCurtainOpen);
-            LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain);
+            LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function);
             #endregion
         }
         /// <summary>
@@ -429,7 +429,7 @@
                 SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png",
             };
             bodyDiv.AddChidren(btnClothesHangerDown);
-            LoadEvent_ControlClothesHanger(function, btnClothesHangerDown, btnClothesHangerUp);
+            LoadEvent_ControlClothesHanger(function,  btnClothesHangerUp, btnClothesHangerDown);
             #endregion
 
 

--
Gitblit v1.8.0