gxc
2019-12-13 eb424d24e39bab4a245725f35deab3f234ea0f13
ZigbeeApp/Shared/Phone/Device/Light/PlugControl.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
@@ -63,6 +64,10 @@
        private Button StatuBtn;
        /// <summary>
        /// IsDrawerLockMode
        /// </summary>
        public bool IsDrawerLockMode;
        #endregion
        #region ◆ 接口__________________________
@@ -184,6 +189,10 @@
            //action();
            //action = null;
            RemoveUpdateControlDeviceStatuAction();
            if (IsDrawerLockMode)
            {
                CommonPage.Instance.IsDrawerLockMode = false;
            }
            base.RemoveFromParent();
        }
@@ -221,8 +230,7 @@
            {
                UserHomeView.ReadStatus(light, () =>
                {
                    light.ReadOnOffStatus();
                    light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice);
                });
            }
            else
@@ -230,8 +238,7 @@
                //防止短时间内多次读取状态
                if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - light.LastDateTime).TotalSeconds)
                {
                    light.ReadOnOffStatus();
                    light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice);
                }
            }