From b02e8275a21dc06bf54b66273485d44e007a2616 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 20 七月 2020 14:50:17 +0800 Subject: [PATCH] 新代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs | 36 ++++++++++++++++++++++++------------ 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs index 45cc199..1412e6a 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs @@ -53,15 +53,21 @@ var bList = bindTargetsFromMutilfunctionPanelList[key]; foreach (var bDev in bList) { + if (curBindType == 0) + { + if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) + { + tempList.Add(bDev); + } + } + var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint); + if (device == null) + { + continue; + } switch (curBindType) { - case 0: - if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) - { - tempList.Add(bDev); - } - break; case 1: if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61) { @@ -221,15 +227,21 @@ var bList = bindTargetsFromMutilfunctionPanelList[key]; foreach (var bDev in bList) { + if (curBindType == 0) + { + if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) + { + tempList.Remove(bDev.KeyEpoint); + } + } + var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint); + if (device == null) + { + continue; + } switch (curBindType) { - case 0: - if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51) - { - tempList.Remove(bDev.KeyEpoint); - } - break; case 1: case 2: if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61) -- Gitblit v1.8.0