| | |
| | | skipAddRoomAction = (type, floor) => |
| | | { |
| | | Room newRoom = new Room() { |
| | | sid = Guid.NewGuid().ToString(), |
| | | uid = Guid.NewGuid().ToString(), |
| | | }; |
| | | editBackAction = () => { |
| | | LoadRoomRow(newRoom); |
| | | }; |
| | | |
| | | var skipPage = new RoomEditPage(newRoom, StringId.AddRoom,editBackAction); |
| | | |
| | | |
| | | var skipPage = new RoomEditPage(newRoom, StringId.AddRoom, editBackAction, null); |
| | | MainPage.BasePageView.AddChidren(skipPage); |
| | | skipPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | /// <summary> |
| | | /// 跳转到编辑房间的界面 |
| | | /// </summary> |
| | | void LoadEvent_SkipEditRoomPage(Room r, Button btnRoomName, ImageView btnBg) |
| | | void LoadEvent_SkipEditRoomPage(Room r, Button btnRoomName, ImageView btnBg, FrameLayout roomRow) |
| | | { |
| | | editBackAction = () => |
| | | { |
| | | if (string.IsNullOrEmpty(r.sid)) |
| | | if (string.IsNullOrEmpty(r.uid)) |
| | | { |
| | | for (int i = 0; i < roomsListView.ChildrenCount; ) |
| | | { |
| | | if (roomsListView.GetChildren(i).Tag.ToString() == r.name + "line" || roomsListView.GetChildren(i).Tag.ToString() == r.name + "row") |
| | | if (roomsListView.GetChildren(i).Tag.ToString() == r.roomName + "line" || roomsListView.GetChildren(i).Tag.ToString() == r.roomName + "row") |
| | | { |
| | | roomsListView.GetChildren(i).RemoveFromParent(); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | btnRoomName.Text = r.floorName + r.name; |
| | | btnRoomName.Text = r.floorName + r.roomName; |
| | | btnBg.ImagePath = r.backgroundImage; |
| | | } |
| | | }; |
| | | var skipPage = new RoomEditPage(r, StringId.EditRoomInfo,editBackAction); |
| | | |
| | | Action deleteAction = () => { |
| | | roomRow.RemoveFromParent(); |
| | | }; |
| | | |
| | | var skipPage = new RoomEditPage(r, StringId.EditRoomInfo, editBackAction, deleteAction); |
| | | MainPage.BasePageView.AddChidren(skipPage); |
| | | skipPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |