From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期五, 12 六月 2020 09:22:04 +0800 Subject: [PATCH] 2020.06.12 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs | 36 ++++++++++++++++++++++++++---------- 1 files changed, 26 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs index 8d2b2fd..9524092 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,12 +127,11 @@ /// <returns></returns> public static string GetCurrentKeyAllRoomList() { - var dicFloor = Common.Room.CurrentRoom.GetFloorSortList(); + var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); foreach (var floorId in dicFloor.Keys) { //绗竴涓ゼ灞� return dicFloor[floorId]; - break; } return null; } @@ -143,12 +142,11 @@ /// <returns></returns> public static string GetCurrentSelectFloorId() { - var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();// + var dicFloor = HdlRoomLogic.Current.GetFloorSortList();// foreach (var floorId in dicFloor.Keys) { //绗竴涓ゼ灞� return floorId; - break; } return null; } @@ -159,12 +157,30 @@ /// <returns></returns> public static string GetCurrentSelectFloorIdName() { - var dicFloor = Common.Room.CurrentRoom.GetFloorSortList(); + var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); foreach (var floorId in dicFloor.Keys) { //绗竴涓ゼ灞� return dicFloor[floorId]; - break; + } + return null; + } + + /// <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]; + } } return null; } -- Gitblit v1.8.0