From 71f1df7772feec5cf83feefa851608adac18e005 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 06 十一月 2019 17:45:23 +0800
Subject: [PATCH] 2019.11.6

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

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
index 716fece..64f7bda 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -709,6 +709,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
 
@@ -721,14 +730,17 @@
             functionSceneAutoBodyView.RemoveAll();
             if (functionBtn.IsSelected)
             {
+                HidenFloor(false);
                 ShowFunction();
             }
             else if (sceneBtn.IsSelected)
             {
+                HidenFloor(false);
                 ShowScene();
             }
             else if (automationBtn.IsSelected)
             {
+                HidenFloor(true);
                 ShowAutotion();
             }
         }
@@ -940,11 +952,30 @@
 
                             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()
@@ -1039,6 +1070,7 @@
 
                             deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                             {
+
                                 var lightControl = new Phone.Device.Light.AirSwitchControl();
                                 UserView.HomePage.Instance.AddChidren(lightControl);
                                 UserView.HomePage.Instance.PageIndex += 1;
@@ -1279,6 +1311,7 @@
                                 UserHomeView.ReadStatus(rollerShade, () =>
                                 {
                                     rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                    rollerShade.ReadWcdCurrentPositionLiftPercentage();
                                 });
                             }
                             else
@@ -1287,6 +1320,7 @@
                                 if ((DateTime.Now - rollerShade.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
                                 {
                                     rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                    rollerShade.ReadWcdCurrentPositionLiftPercentage();
                                 }
                             }
 

--
Gitblit v1.8.0