From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs index 5ffffc4..8e5497c 100644 --- 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; } @@ -328,7 +327,7 @@ Width=Application.GetRealWidth(500), Height = Application.GetRealHeight(60), Gravity = Gravity.CenterHorizontal, - Text = device.CommonDevice.DeviceEpointName, + Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextSize=15, IsBold=true @@ -482,9 +481,9 @@ UserView.HomePage.Instance.AddChidren(detailInfo); UserView.HomePage.Instance.PageIndex += 1; detailInfo.Show(device, room); - detailInfo.action = () => + detailInfo.EditAction += (curDev, curRoom) => { - Show(device, room); + Show(curDev, curRoom); }; } -- Gitblit v1.8.0