From 98ceb6bd2021f9ff136cda27eef28676dd7b5d92 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 21 五月 2020 13:24:02 +0800
Subject: [PATCH] 最后的版本

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs |   34 +++++++++++++++++++++++++++-------
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
index 8d2b2fd..720426a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Threading.Tasks;
 using Shared.Common;
-using Shared.Phone.Device.Category;
 using Shared.Phone.UserCenter.Device;
 using ZigBee.Device;
 using static ZigBee.Device.Panel;
@@ -46,7 +45,7 @@
         /// <returns></returns>
         public static bool CheckCanShowRoom(Common.Room room, string curDeviceBindType = "AddSwitch")
         {
-            if (room.DeviceUIList.Count == 0)
+            if (room.ListDevice.Count == 0)
             {
                 return false;
             }
@@ -54,10 +53,11 @@
             {
                 return false;
             }
-            foreach (var deviceUi in room.DeviceUIList)
+            foreach (var deviceKeys in room.ListDevice)
             {
+                var device = Common.LocalDevice.Current.GetDevice(deviceKeys);
                 //妫�娴嬭璁惧鑳藉惁鏄剧ず
-                if (CheckCanShowDevice(deviceUi.CommonDevice, curDeviceBindType) == false)
+                if (CheckCanShowDevice(device, curDeviceBindType) == false)
                 {
                     continue;
                 }
@@ -127,7 +127,7 @@
         /// <returns></returns>
         public static string GetCurrentKeyAllRoomList()
         {
-            var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();
+            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
             foreach (var floorId in dicFloor.Keys)
             {
                 //绗竴涓ゼ灞�
@@ -143,7 +143,7 @@
         /// <returns></returns>
         public static string GetCurrentSelectFloorId()
         {
-            var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();//
+            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();//
             foreach (var floorId in dicFloor.Keys)
             {
                 //绗竴涓ゼ灞�
@@ -159,7 +159,7 @@
         /// <returns></returns>
         public static string GetCurrentSelectFloorIdName()
         {
-            var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();
+            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
             foreach (var floorId in dicFloor.Keys)
             {
                 //绗竴涓ゼ灞�
@@ -170,6 +170,26 @@
         }
 
         /// <summary>
+        /// 鑾峰彇褰撳墠妤煎眰鍚嶇О
+        /// fllodID:妤煎眰ID
+        /// </summary>
+        /// <returns></returns>
+        public static string GetBindTargetsFloorIdName(string curFllodID)
+        {
+            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
+            foreach (var floorId in dicFloor.Keys)
+            {
+                //褰撳墠妤煎眰
+                if (curFllodID == floorId)
+                {
+                    return dicFloor[floorId];
+                    break;
+                }
+            }
+            return null;
+        }
+
+        /// <summary>
         ///  妫�娴嬫帶鍒堕潰鏉�(鎸夐敭绫�)鎵�鎷ユ湁鐨勫姛鑳�,鐜版敮鎸佺殑鏈変互涓嬪嚑绉�(蹇呭畾瀛樺湪閿��,鍑洪敊浼氳繑鍥瀗ull)
         /// </summary>
         /// <returns>The panel key function level2.</returns>

--
Gitblit v1.8.0