From 82a773d1783549caca563831aac8affc059deedf Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 07 十一月 2019 10:56:13 +0800
Subject: [PATCH] 合并了全部的代码,IOS 图片需要从新引入工程

---
 ZigbeeApp/Shared/Phone/Device/Category/Category.cs |   45 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
index 2c7eb8b..7150dfc 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -714,6 +714,15 @@
             UserView.HomePage.Instance.PageIndex += 1;
             addLogicPage.Show();
         }
+        /// <summary>
+        /// HidenFloor
+        /// </summary>
+        /// <param name="statu"></param>
+        private void HidenFloor(bool statu)
+        {
+            selectFloorBtn.Visible = !statu;
+            floorBtn.Visible = !statu;
+        }
 
         #endregion
 
@@ -726,14 +735,17 @@
             functionSceneAutoBodyView.RemoveAll();
             if (functionBtn.IsSelected)
             {
+                HidenFloor(false);
                 ShowFunction();
             }
             else if (sceneBtn.IsSelected)
             {
+                HidenFloor(false);
                 ShowScene();
             }
             else if (automationBtn.IsSelected)
             {
+                HidenFloor(true);
                 ShowAutotion();
             }
         }
@@ -945,13 +957,32 @@
 
                             deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                             {
-                                var lightControl = new Phone.Device.Light.LightControl();
-                                UserView.HomePage.Instance.AddChidren(lightControl);
-                                UserView.HomePage.Instance.PageIndex += 1;
-                                //lightControl.action = RefreshBodyView;
-                                lightControl.Show(deviceUI, room);
+                                if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A寮�鍏�)
+                                {
+                                    var lightControl = new Phone.Device.Light.OnOffControl();
+                                    UserView.HomePage.Instance.AddChidren(lightControl);
+                                    UserView.HomePage.Instance.PageIndex += 1;
+                                    //lightControl.action = RefreshBodyView;
+                                    lightControl.Show(deviceUI, room);
+                                }
+                                else if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A鎻掑骇)
+                                {
+                                    var lightControl = new Phone.Device.Light.PlugControl();
+                                    UserView.HomePage.Instance.AddChidren(lightControl);
+                                    UserView.HomePage.Instance.PageIndex += 1;
+                                    //lightControl.action = RefreshBodyView;
+                                    lightControl.Show(deviceUI, room);
+                                }
+                                else
+                                {
+                                    var lightControl = new Phone.Device.Light.LightControl();
+                                    UserView.HomePage.Instance.AddChidren(lightControl);
+                                    UserView.HomePage.Instance.PageIndex += 1;
+                                    //lightControl.action = RefreshBodyView;
+                                    lightControl.Show(deviceUI, room);
+                                }
                             };
-                            
+
                             var editBtn = new CommonForm.RowLayoutEditButton()
                             {
                                 Tag = deviceUI,
@@ -1284,6 +1315,7 @@
                                 UserHomeView.ReadStatus(rollerShade, () =>
                                 {
                                     rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                    rollerShade.ReadWcdCurrentPositionLiftPercentage();
                                 });
                             }
                             else
@@ -1292,6 +1324,7 @@
                                 if ((DateTime.Now - rollerShade.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
                                 {
                                     rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                    rollerShade.ReadWcdCurrentPositionLiftPercentage();
                                 }
                             }
 

--
Gitblit v1.8.0