From f5ba05c33393e55de28db91433901600bfb0658f Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 22 五月 2020 17:43:11 +0800 Subject: [PATCH] 请合并最新代码「20200522:添加门锁晚上9点上报常开功能,优化PM2.5测试功能」 --- ZigbeeApp20200519/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 51 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp20200519/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs b/ZigbeeApp20200519/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs old mode 100755 new mode 100644 index f0a3123..1bceb2e --- a/ZigbeeApp20200519/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs +++ b/ZigbeeApp20200519/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs @@ -1080,7 +1080,8 @@ var delDevice = DelBindDevice(bd); var delResult = new DelDeviceBindResponseAllData(); delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); - if (delResult == null || delResult.removeBindResultResponseData == null) + + if (delResult == null) { Application.RunOnMainThread(() => { @@ -1090,6 +1091,29 @@ CommonPage.Loading.Hide(); }); return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result != 1) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } } if (delResult != null && delResult.removeBindResultResponseData != null) { @@ -1116,7 +1140,8 @@ var delDevice = DelBindDevice(curBindDevice); var delResult = new DelDeviceBindResponseAllData(); delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); - if (delResult == null || delResult.removeBindResultResponseData == null) + + if (delResult == null) { Application.RunOnMainThread(() => { @@ -1126,6 +1151,29 @@ CommonPage.Loading.Hide(); }); return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result != 1) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } } if (delResult != null && delResult.removeBindResultResponseData != null) { @@ -1171,7 +1219,7 @@ addBindInfo.BindType = 0; addBindInfo.BindMacAddr = de.DeviceAddr; addBindInfo.BindEpoint = de.DeviceEpoint; - addBindeDev.BindName = de.DeviceEpointName; + addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de); switch (curDeviceBindType) { case 2: -- Gitblit v1.8.0