From 068c68295cad1967f7aafb4e5e951260ef03d4ce Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 09 七月 2021 09:16:43 +0800
Subject: [PATCH] 状态属性更改,不要轻易合并

---
 HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
index 372e38b..667d40b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
@@ -58,6 +58,11 @@
         Button btnFromFloor_Out;
         bool onDimmerBar = false;
         Function function;
+
+        /// <summary>
+        /// 鏈�鍚庢墦寮�鐨勯鑹�
+        /// </summary>
+        byte[] lastColor = new byte[3] { 255, 255, 255 };
         /// <summary>
         /// 鍒锋柊鏄剧ず淇℃伅
         /// </summary>
@@ -139,12 +144,12 @@
                 UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
                 IsSelected = function.collect
             };
-            //controlView.AddChidren(btnCollection);
+            controlView.AddChidren(btnCollection);
             //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
-            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
-            {
-                controlView.AddChidren(btnCollection);
-            }
+            //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
+            //{
+            //    controlView.AddChidren(btnCollection);
+            //}
 
             //鑹茬洏鐨勬甯冩帶浠�(闄愬埗閭d釜鐧借壊婊戝姩鐞冧娇鐢�)
             var framePickerBack = new FrameLayout();
@@ -159,16 +164,16 @@
                 ColorImagePath = "FunctionIcon/Light/ColorWheel.png",
             };
             framePickerBack.AddChidren(colorPicker);
-            if(function.trait_on_off.curValue.ToString() == "off")
+            if(function.trait_on_off.state.ToString() == "off")
             {
                 colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheelGray.png";
             }
-            colorPicker.MouseDownEventHandler = (sender, e) => {
-                MainPage.BasePageView.ScrollEnabled = false;
-            };
-            colorPicker.MouseUpEventHandler = (sender, e) => {
-                MainPage.BasePageView.ScrollEnabled = true;
-            };
+            //colorPicker.MouseDownEventHandler = (sender, e) => {
+            //    MainPage.BasePageView.ScrollEnabled = false;
+            //};
+            //colorPicker.MouseUpEventHandler = (sender, e) => {
+            //    MainPage.BasePageView.ScrollEnabled = true;
+            //};
 
             //鐧界偣鎺т欢
             this.btnWhiteRound = new Button();
@@ -216,7 +221,7 @@
                 ThumbImageHeight = Application.GetRealHeight(54),
                 ProgressTextColor = CSS_Color.FirstLevelTitleColor,
                 ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
-                ProgressBarColor = function.trait_on_off.curValue.ToString() == "on" ? CSS_Color.AuxiliaryColor1 : CSS_Color.DividingLineColor,
+                ProgressBarColor = function.trait_on_off.state.ToString() == "on" ? CSS_Color.AuxiliaryColor1 : CSS_Color.DividingLineColor,
                 MaxValue = 100,
                 Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)),
                 SeekBarPadding = Application.GetRealWidth(20),
@@ -323,7 +328,7 @@
                 Height = Application.GetMinRealAverage(32),
                 UnSelectedImagePath = "Public/PowerClose.png",
                 SelectedImagePath = "Public/PowerOpen.png",
-                IsSelected = function.trait_on_off.curValue.ToString() == "on"
+                IsSelected = function.trait_on_off.state.ToString() == "on"
             };
             controlView.AddChidren(btnSwitch);
 

--
Gitblit v1.8.0