| | |
| | | |
| | | #region 数据处理 |
| | | //获取楼层 |
| | | dicFloor = Common.Room.CurrentRoom.GetFloorSortList(); |
| | | dicFloor = HdlRoomLogic.Current.GetFloorSortList(); |
| | | currentKey.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId(); |
| | | btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName(); |
| | | |
| | | btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
|
| | |
|
| | | var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); |
| | | if (Common.Config.Instance.Home.FloorDics.Count == 0) |
| | | { |
| | | // 获取没有楼层房间 |
| | | foreach (var room in Shared.Common.Room.Lists) |
| | | foreach (var room in listAllRoom) |
| | | { |
| | | if (string.IsNullOrEmpty(room.FloorId)) |
| | | { |
| | |
| | | else |
| | | { |
| | | // 获取楼层对应对房间 |
| | | foreach (var room in Shared.Common.Room.Lists) |
| | | foreach (var room in listAllRoom) |
| | | { |
| | | if (room.FloorId == currentKey.currentSelectFloorId) |
| | | { |
| | |
| | | int index = 0; |
| | | RefreshRoomList(curRoom, ref index); |
| | | |
| | | if (curRoom.SceneUIList.Count == 0) |
| | | if (curRoom.ListSceneId.Count == 0) |
| | | { |
| | | btnFinifh.Enable = false; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; |
| | |
| | | } |
| | | |
| | | //如果房间中没有场景,则不显示 |
| | | if (room.SceneUIList.Count == 0) |
| | | if (room.ListSceneId.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | curRoom = room; |
| | | currentKey.RoomId = room.Id; |
| | | if (curRoom.SceneUIList.Count == 0) |
| | | if (curRoom.ListSceneId.Count == 0) |
| | | { |
| | | btnFinifh.Enable = false; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; |
| | |
| | | void RefreshSceneList(Shared.Common.Room curRoom) |
| | | { |
| | | midVerticalScrolViewLayout.RemoveAll(); |
| | | if (curRoom.SceneUIList.Count == 0) |
| | | if (curRoom.ListSceneId.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | |
| | | }; |
| | | rowLayout.AddChidren(line2); |
| | | |
| | | if (curIndex == curRoom.SceneUIList.Count - 1) |
| | | if (curIndex == curRoom.ListSceneId.Count - 1) |
| | | { |
| | | line2.Visible = false; |
| | | } |
| | |
| | | btnMethodText.IsSelected = true; |
| | | oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | oldbuttonText.IsBold = true; |
| | | } |
| | | |
| | | //获取楼层对应的房间 |
| | | foreach (var room in Shared.Common.Room.Lists) |
| | | }
|
| | |
|
| | | //获取楼层对应的房间
|
| | | var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); |
| | | foreach (var room in listAllRoom) |
| | | { |
| | | if (room.FloorId == currentKey.currentSelectFloorId) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | List<SceneUI> GetALlDispalyRoomSceneList() |
| | | { |
| | | currentKeyAllRoomSceneList.Clear(); |
| | | // 获取所有房间 |
| | | foreach (var room in Shared.Common.Room.Lists) |
| | | currentKeyAllRoomSceneList.Clear();
|
| | | // 获取所有房间 |
| | | var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); |
| | | foreach (var room in listAllRoom) |
| | | { |
| | | //如果房间为喜爱,则不显示 |
| | | if (room.IsLove == true) |
| | |
| | | continue; |
| | | } |
| | | //如果房间中没有场景,则不显示 |
| | | if (room.SceneUIList.Count == 0) |
| | | if (room.ListSceneId.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | foreach (var scene in room.SceneUIList) |
| | | { |
| | | foreach (var sceneId in room.ListSceneId) |
| | | {
|
| | | var scene = HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId); |
| | | if (scene == null) |
| | | { |
| | | continue; |
| | | } |
| | | currentKeyAllRoomSceneList.Add(scene); |
| | | } |
| | | } |
| | |
| | | List<SceneUI> GetMatchSceneUIList(Shared.Common.Room curRoom) |
| | | { |
| | | var tempSceneUIList = new List<SceneUI>(); |
| | | foreach (var scene in curRoom.SceneUIList) |
| | | foreach (var sceneId in curRoom.ListSceneId) |
| | | { |
| | | var gwSc = gwCurScenesList.Find(obj => (obj.ScenesId == scene.Id)); |
| | | var scene = HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
|
| | | if (scene == null)
|
| | | {
|
| | | continue;
|
| | | } |
| | | var gwSc = gwCurScenesList.Find(obj => (obj.ScenesId == sceneId)); |
| | | if (gwSc != null) |
| | | { |
| | | tempSceneUIList.Add(scene); |