| | |
| | | /// sceneUI |
| | | /// </summary> |
| | | public SceneUI sceneUI; |
| | | |
| | | /// <summary> |
| | | /// 当前场景本身,添加场景时使用 |
| | | /// </summary> |
| | | public SceneUI currentSceneUI; |
| | | |
| | | #endregion |
| | | |
| | |
| | | |
| | | AddBodyView(); |
| | | |
| | | RefreshBodyView(); |
| | | RefreshBodyView(Config.Instance.Home.CurrentFloorId); |
| | | } |
| | | |
| | | |
| | |
| | | var floors = new SelectFloor(); |
| | | AddChidren(floors); |
| | | floors.Init(580, 184, Direction.Right); |
| | | floors.FloorAction += (floorName) => |
| | | floors.FloorAction += (floorId) => |
| | | { |
| | | floorBtn.Text = floorName; |
| | | RefreshBodyView(); |
| | | floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId); |
| | | RefreshBodyView(floorId); |
| | | }; |
| | | } |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// RefreshBodyView |
| | | /// </summary> |
| | | private void RefreshBodyView() |
| | | private void RefreshBodyView(string floorId) |
| | | { |
| | | AddRoomView(); |
| | | AddRoomView(floorId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// AddRoomView |
| | | /// </summary> |
| | | private void AddRoomView() |
| | | private void AddRoomView(string floorId) |
| | | { |
| | | var roomFL = new HorizontalScrolViewLayout() |
| | | { |
| | |
| | | bodyFrameLayout.AddChidren(functionSceneBodyView); |
| | | |
| | | Button curBtn = new Button(); |
| | | foreach (var room in Common.Room.CurrentRoom.GetRoomsByCurrentFloorIdAppendLoveRoom()) |
| | | foreach (var room in Common.Room.CurrentRoom.GetRoomsByFloorIdAppendLoveRoom(floorId)) |
| | | { |
| | | var row = new FrameLayout() |
| | | { |
| | |
| | | for (int i = 0; i < sceneList.Count; i++) |
| | | { |
| | | var scene = sceneList[i]; |
| | | if (currentSceneUI?.Id == scene.Id) |
| | | { |
| | | continue; |
| | | } |
| | | if (beforeSceneTargetDeviceUIs.Find((obj) => obj.SceneUI.Id == scene.Id) != null) |
| | | { |
| | | continue; |
| | |
| | | sceneRowLayout.Init(); |
| | | sceneRowLayout.SetTitle(scene.Name); |
| | | sceneRowLayout.ClickButton.Tag = scene; |
| | | if(sceneUI==null) |
| | | if (sceneUI == null) |
| | | { |
| | | if (i == 0) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | if(sceneUI.Id==scene.Id) |
| | | if (sceneUI.Id == scene.Id) |
| | | { |
| | | tempSceneRow = sceneRowLayout; |
| | | sceneUI = scene; |