wxr
2021-07-01 adc150efb13a0506f45a3c344c3ee2ef2dba8e90
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomsManagementPageBLL.cs
@@ -12,30 +12,20 @@
        Action editBackAction;
        /// <summary>
        /// 加载事件列表
        /// </summary>
        void LoadEventList()
        {
        }
        /// <summary>
        /// 跳转到增加房间的界面
        /// </summary>
        void LoadEvent_SkipAddRoomPage()
        {
            skipAddRoomAction = (type, floor) =>
            skipAddRoomAction = () =>
            {
                Room newRoom = new Room() {
                    sid = Guid.NewGuid().ToString(),
                };
                editBackAction = () => {
                Action<Room> addRoomBackAction = (newRoom) =>
                {
                    LoadRoomRow(newRoom);
                };
                var skipPage = new RoomEditPage(newRoom, StringId.AddRoom,editBackAction);
                MainPage.BasePageView.AddChidren(skipPage);
                skipPage.LoadPage();
                var addRoomPage = new AddRoomPage(addRoomBackAction);
                MainPage.BasePageView.AddChidren(addRoomPage);
                addRoomPage.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
@@ -43,15 +33,15 @@
        /// <summary>
        /// 跳转到编辑房间的界面
        /// </summary>
        void LoadEvent_SkipEditRoomPage(Room r,Button btnRoomName,Button btnBg)
        void LoadEvent_SkipEditRoomPage(Room r, Button btnRoomName, ImageView btnBg, FrameLayout roomRow)
        {
            editBackAction = () =>
            {
                if (string.IsNullOrEmpty(r.sid))
                if (string.IsNullOrEmpty(r.roomId))
                {
                    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();
                        }
@@ -63,11 +53,20 @@
                }
                else
                {
                    btnRoomName.Text = r.floorName + r.name;
                    btnBg.UnSelectedImagePath = r.backgroundImage;
                    btnRoomName.Text = r.floorName + r.roomName;
                    btnBg.ImagePath = r.backgroundImage;
                }
            };
            var skipPage = new RoomEditPage(r, StringId.EditRoomInfo,editBackAction);
            Action deleteAction = () => {
                roomRow.RemoveFromParent();
            };
            Action modifyImageAction = () => {
                ImageUtlis.Current.LoadLocalOrNetworkImages(r.backgroundImage, btnBg);
            };
            var skipPage = new RoomEditPage(r, editBackAction, deleteAction, modifyImageAction);
            MainPage.BasePageView.AddChidren(skipPage);
            skipPage.LoadPage();
            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;