From eb424d24e39bab4a245725f35deab3f234ea0f13 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 13 十二月 2019 10:48:50 +0800 Subject: [PATCH] 2019.12.13 --- ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs | 31 ++++++++++++++----------------- 1 files changed, 14 insertions(+), 17 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs index 5e8a5be..87d0d18 100644 --- a/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs +++ b/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Shared.Common; using Shared.Phone.Device.CommonForm; +using Shared.Phone.Device.DeviceLogic; using Shared.Phone.UserView; using ZigBee.Device; namespace Shared.Phone.Device.Light @@ -61,6 +62,11 @@ private FrameLayout bodyFrameLayout; private Button StatuBtn; + + /// <summary> + /// IsDrawerLockMode + /// </summary> + public bool IsDrawerLockMode; #endregion @@ -157,9 +163,13 @@ public override void RemoveFromParent() { ZbGateway.StatusList.Remove(this); - action(); - action = null; + //action(); + //action = null; RemoveUpdateControlDeviceStatuAction(); + if (IsDrawerLockMode) + { + CommonPage.Instance.IsDrawerLockMode = false; + } base.RemoveFromParent(); } @@ -197,8 +207,7 @@ { UserHomeView.ReadStatus(light, () => { - light.ReadOnOffStatus(); - light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice); }); } else @@ -206,8 +215,7 @@ //闃叉鐭椂闂村唴澶氭璇诲彇鐘舵�� if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - light.LastDateTime).TotalSeconds) { - light.ReadOnOffStatus(); - light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice); } } @@ -242,16 +250,6 @@ { RemoveFromParent(); }; - - var sharedBtn = new Button - { - X = Application.GetRealWidth(850), - Width = Application.GetMinReal(69), - Height = Application.GetMinReal(69), - Gravity = Gravity.CenterVertical, - UnSelectedImagePath = "Item/Shared.png" - }; - top.topView.AddChidren(sharedBtn); var moreBtn = new Button { @@ -472,7 +470,6 @@ /// <param name="e">E.</param> private void Collection(object sender, MouseEventArgs e) { - //collection if ((sender as Button).IsSelected) { Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(device.FileName); -- Gitblit v1.8.0