From b5d11d4b592f2ee398d5174ad6e2e22f1db367e8 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 18 八月 2021 11:51:52 +0800
Subject: [PATCH] 2021-08-18 1.完善Android对接LinphoneSDK 2.完善SIP相关接口对接

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

diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index c88c448..27ce249 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -160,7 +160,6 @@
                             LoadLastStatesButton();
                             break;
                         case FunctionCategory.Light:
-                            //btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png";
                             btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                             LoadLightControl();
                             break;
@@ -228,7 +227,7 @@
             };
             //bodyDiv.AddChidren(btnCollectionIcon);
             //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
-            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare && function.Spk_Prefix != FunctionCategory.Sensor)
+            if ( function.Spk_Prefix != FunctionCategory.Sensor)//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare &&
             {
                 bodyDiv.AddChidren(btnCollectionIcon);
             }
@@ -309,10 +308,15 @@
                 Height = Application.GetMinRealAverage(32),
                 UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
                 SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
-                IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) == "0",
+                IsSelected = function.GetAttrState(FunctionAttributeKey.OnOff) == "off",
                 Tag = function.sid + "_off"
             };
             bodyDiv.AddChidren(btnCurtainClose);
+            if(function.spk == SPK.CurtainRoller)
+            {
+                btnCurtainClose.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainDownIcon.png";
+                btnCurtainClose.SelectedImagePath = "FunctionIcon/Curtain/CurtainDownIconOn.png";
+            }
 
             var btnCurtainStop = new Button()
             {
@@ -335,9 +339,14 @@
                 UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
                 SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
                 Tag = function.sid + "_on",
-                IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) != "0"
+                IsSelected = function.GetAttrState(FunctionAttributeKey.OnOff) == "on",
             };
             bodyDiv.AddChidren(btnCurtainOpen);
+            if (function.spk == SPK.CurtainRoller)
+            {
+                btnCurtainOpen.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainUpIcon.png";
+                btnCurtainOpen.SelectedImagePath = "FunctionIcon/Curtain/CurtainUpIconOn.png";
+            }
             LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function);
             #endregion
         }
@@ -399,7 +408,7 @@
                 Height = Application.GetMinRealAverage(32),
                 UnSelectedImagePath = "MusicIcon/pause.png",
                 SelectedImagePath = "MusicIcon/play.png",
-                IsSelected = (function as A31MusicModel).A31PlayStatus.status == "play" ,
+                //IsSelected = (function as A31MusicModel).A31PlayStatus.status == "play" ,
                 Tag = function.spk + "_State_" + function.sid
             };
             bodyDiv.AddChidren(btnPlay);

--
Gitblit v1.8.0