From d12e7730bb88d57763a6caaeacb0248a65bf3309 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 03 十二月 2019 13:10:32 +0800
Subject: [PATCH] 2019.12.3
---
ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs | 33 +++++++++++++++------------------
1 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
index 02e5698..6d52a0a 100644
--- a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
@@ -1,6 +1,7 @@
锘縰sing System;
using Shared.Common;
using Shared.Phone.Device.CommonForm;
+using Shared.Phone.Device.DeviceLogic;
using ZigBee.Device;
namespace Shared.Phone.Device.Light
@@ -61,6 +62,11 @@
/// MaxLevel
/// </summary>
private const int MaxLevel = 254;
+
+ /// <summary>
+ /// IsDrawerLockMode
+ /// </summary>
+ public bool IsDrawerLockMode;
#endregion
#region 鈼� 鎺ュ彛__________________________
@@ -191,8 +197,12 @@
{
ZbGateway.StatusList.Remove(this);
UserView.HomePage.Instance.ScrollEnabled = true;
- action();
- action = null;
+ //action();
+ //action = null;
+ if (IsDrawerLockMode)
+ {
+ CommonPage.Instance.IsDrawerLockMode = false;
+ }
base.RemoveFromParent();
}
@@ -204,6 +214,7 @@
/// </summary>
public DimmableLightControl()
{
+ UserView.HomePage.Instance.ScrollEnabled = false;
BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
ZbGateway.StatusList.Add(this);
}
@@ -236,9 +247,7 @@
//鍙戦�佽鍙栫姸鎬佸懡浠�
UserView.UserHomeView.ReadStatus(dimmableLight, () =>
{
- dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
- dimmableLight.ReadOnOffStatus();
- dimmableLight.ReadLevel();
+ ReadDeviceAttributeLogic.Instance.SendDimmableLightStatuComand(device.CommonDevice);
});
}
else
@@ -246,9 +255,7 @@
//闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵��
if ((DateTime.Now - dimmableLight.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
{
- dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
- dimmableLight.ReadOnOffStatus();
- dimmableLight.ReadLevel();
+ ReadDeviceAttributeLogic.Instance.SendDimmableLightStatuComand(device.CommonDevice);
}
}
}
@@ -269,16 +276,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
{
--
Gitblit v1.8.0