From fa6bcb2e9907772480f99205f36ec2a1ce735a22 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 09 一月 2020 14:11:07 +0800
Subject: [PATCH] 合并代码

---
 ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
index 7a66cff..bcbcbbc 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
@@ -20,7 +20,7 @@
         /// <summary>
         /// The action.
         /// </summary>
-        public Action action;
+        public Action<DeviceUI, Common.Room> action;
 
         /// <summary>
         /// The light image.
@@ -185,8 +185,8 @@
         public override void RemoveFromParent()
         {
             ZbGateway.StatusList.Remove(this);
-            //action();
-            //action = null;
+            action(device, room);
+            action = null;
             if (IsDrawerLockMode)
             {
                 CommonPage.Instance.IsDrawerLockMode = false;
@@ -241,8 +241,7 @@
                 }
             }
 
-            var de = Shared.Common.Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
-            if (de == null)
+            if(Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
             {
                 collectionBtn.IsSelected = false;
             }
@@ -482,9 +481,9 @@
             UserView.HomePage.Instance.AddChidren(detailInfo);
             UserView.HomePage.Instance.PageIndex += 1;
             detailInfo.Show(device, room);
-            detailInfo.EditAction = (d,r) =>
+            detailInfo.EditAction += (curDev, curRoom) =>
             {
-                Show(device, room);
+                Show(curDev, curRoom);
             };
         }
 

--
Gitblit v1.8.0