From 8b9ce384b26c414db32f98e94e088f5334869c2d Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 13 十一月 2019 15:36:28 +0800
Subject: [PATCH] 全部合并了代码,安卓和 IOS 都测试通过了

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index b740b67..93da3b6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -179,12 +179,8 @@
                     roomList.Add(room);
                 }
             }
-            //褰撳墠鎸夐敭鎵�鏈夋樉绀烘埧闂寸殑鎵�鏈夎澶囧鐞�
-            var aa = GetALlDispalyRoomDeviceList();
             //棣栨鎷垮埌鎵�鏈夋埧闂翠腑鎸夐敭鐨勭洰鏍囧苟瀛樺偍
-            //if (IsInitEntry)
-            //{
-            //棣栨鎷垮埌鎵�鏈夋埧闂翠腑鎸夐敭鐨勭洰鏍囧苟瀛樺偍
+            GetALlDispalyRoomDeviceList();
             if (currentKeyAllRoomDeviceList.Count != 0)
             {
                 if (currentKey.bindList != null && currentKey.bindList.Count != 0)
@@ -203,7 +199,7 @@
                     }
                 }
             }
-            if (oldTargetList != null)
+            if (oldTargetList.Count != 0)
             {
                 foreach (var de in oldTargetList.Keys)
                 {
@@ -212,7 +208,10 @@
                 }
             }
 
-            //}
+            if (roomList.Count == 0)
+            {
+                return;
+            }
             Shared.Common.Room curRoom = roomList[0];
             int index = 0;
             RefreshRoomList(curRoom, btnChooseKeyMode, ref index);
@@ -522,6 +521,10 @@
             int curIndex = 0;
             foreach (var device in curTypeDeviceList)
             {
+                if (device.CommonDevice != null && device.CommonDevice.IsOnline == 0)
+                {
+                    continue;
+                }
                 #region 缁戝畾琛║I鏄撅紙鏃犳暟鎹鐞嗭級
                 var rowLayout = new FrameLayout()
                 {

--
Gitblit v1.8.0