| | |
| | | return; |
| | | } |
| | | } |
| | | SpatialInfo.CurrentSpatial.AddRoom(room); |
| | | room.SaveRoomData(); |
| | | var addResult = SpatialInfo.CurrentSpatial.AddRoom(room); |
| | | if (addResult == StateCode.SUCCESS) |
| | | { |
| | | backAction(); |
| | | this.RemoveFromParent(); |
| | | } |
| | | } |
| | | if (btnOption.TextID == StringId.DeleteRoom) |
| | | { |
| | | Action action = () => |
| | | { |
| | | var delResult = SpatialInfo.CurrentSpatial.DelRoom(room); |
| | | if (delResult == StateCode.SUCCESS) |
| | | { |
| | | foreach (var f in DB_ResidenceData.functionList.GetAllFunction()) |
| | | { |
| | |
| | | f.roomIds.Remove(room.roomId); |
| | | } |
| | | } |
| | | SpatialInfo.CurrentSpatial.DelRoom(room); |
| | | // backAction(); |
| | | // DB_ResidenceData.DelRoom(room); |
| | | //删除事件回调 |
| | | this.deleteAction?.Invoke(); |
| | | this.RemoveFromParent(); |
| | | } |
| | | }; |
| | | new PublicAssmebly().TipMsg(StringId.Tip, StringId.DeleteRoomTip, action); |
| | | }; |
| | |
| | | { |
| | | btnFloorInfo.Text = room.floorName; |
| | | }; |
| | | var residentialManagePage = new FloorsManagementPage(floorsCallBackAction); |
| | | var residentialManagePage = new RoomBinglingFloorPage(floorsCallBackAction, room); |
| | | MainPage.BasePageView.AddChidren(residentialManagePage); |
| | | residentialManagePage.LoadPage(room, StringId.FloorAssignment); |
| | | residentialManagePage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnFloorInfo.MouseUpEventHandler = eventHandler; |