| | |
| | |
|
| | | bool receiptData = false;
|
| | | string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice);
|
| | | HdlDeviceAttributeLogic.Current.AddAttributeEvent("CurtainDeviceAttribute", "DeviceStatusReport", (device) =>
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("CurtainDeviceAttribute", ReceiveComandDiv.A设备属性上报, (device) =>
|
| | | {
|
| | | string checkKey = LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | if (mainkeys != checkKey || device.DeviceStatusReport.CluterID != 258)
|
| | |
| | | return false;
|
| | | }
|
| | | //移除监听
|
| | | HdlDeviceAttributeLogic.Current.RemoveEvent("CurtainDeviceAttribute");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("CurtainDeviceAttribute");
|
| | |
|
| | | //备份窗帘数据
|
| | | if (this.backupCurtainData == true)
|
| | |
| | | /// </summary>
|
| | | private void ReceiveLimitData()
|
| | | {
|
| | | if (HdlDeviceAttributeLogic.Current.IsEsixt("ReceiveLimitData") == true)
|
| | | if (HdlGatewayReceiveLogic.Current.IsEsixt("ReceiveLimitData") == true)
|
| | | {
|
| | | HdlDeviceAttributeLogic.Current.RemoveEvent("ReceiveLimitData");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("ReceiveLimitData");
|
| | | }
|
| | | string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice);
|
| | | HdlDeviceAttributeLogic.Current.AddAttributeEvent("ReceiveLimitData", "DeviceStatusReport", (device) =>
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReceiveLimitData", ReceiveComandDiv.A设备属性上报, (device) =>
|
| | | {
|
| | | string checkKey = LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | if (mainkeys != checkKey || device.DeviceStatusReport.CluterID != 258)
|
| | |
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseForm()
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | HdlDeviceAttributeLogic.Current.RemoveEvent("CurtainDeviceAttribute");
|
| | | HdlDeviceAttributeLogic.Current.RemoveEvent("ReceiveLimitData");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("CurtainDeviceAttribute");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("ReceiveLimitData");
|
| | |
|
| | | UserView.HomePage.Instance.ScrollEnabled = true;
|
| | |
|
| | | base.CloseForm();
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|