From 9d61367c1fd278f58f721d4c0e69999f89e4485d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 12 十二月 2019 14:14:30 +0800
Subject: [PATCH] 添加最新绑定机制
---
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
old mode 100755
new mode 100644
index 5e8a5be..87d0d18
--- 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