wxr
2020-08-13 6a9ad7ec93218913a2ce3b898bb036f18f8f0da4
HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditPage.cs
@@ -23,7 +23,7 @@
        /// <summary>
        /// 房间背景显示按钮
        /// </summary>
        Button btnRoomBg;
        ImageView btnRoomBg;
        /// <summary>
        /// 房间信息编辑区域
        /// </summary>
@@ -130,18 +130,28 @@
        #endregion
        Room room;
        int pageTitleId;
        int rowCount = 1;
        Action backAction;
        public RoomEditPage(Room r, int tId)
        public RoomEditPage(Room r, int tId,Action action)
        {
            bodyView = this;
            room = r;
            pageTitleId = tId;
            backAction = action;
        }
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(pageTitleId));
            if (pageTitleId == StringId.AddRoom)
            {
                new TopViewDiv(bodyView, Language.StringByID(pageTitleId)).LoadTopView();
            }
            else
            {
                new TopViewDiv(bodyView, Language.StringByID(pageTitleId)).LoadTopView(backAction);
            }
            roomBgView = new FrameLayout()
            {
@@ -163,14 +173,16 @@
            };
            roomBgView.AddChidren(btnTipRoomName);
            btnRoomBg = new Button()
            btnRoomBg = new ImageView()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = btnTipRoomName.Bottom,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(184),
                UnSelectedImagePath = room.backgroundImage,
                Radius = (uint)Application.GetRealWidth(6),
                //UnSelectedImagePath = room.backgroundImage,
                ImagePath = room.backgroundImage,
                Radius = (uint)Application.GetRealWidth(12),
                //Radius = (uint)Application.GetRealWidth(6),
            };
            roomBgView.AddChidren(btnRoomBg);
@@ -178,7 +190,7 @@
            roomInfoView = new VerticalScrolViewLayout()
            {
                Y = roomBgView.Bottom + Application.GetRealHeight(8),
                Height = Application.GetRealHeight(51 * 5),
                Height = Application.GetRealHeight(50 * 5),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                ScrollEnabled = false,
            };
@@ -203,6 +215,7 @@
                Height = Application.GetRealHeight(50),
            };
            roomInfoView.AddChidren(roomNameRow);
            rowCount++;
            btnRoomNameTile = new Button()
            {
@@ -243,6 +256,7 @@
                Height = Application.GetRealHeight(50),
            };
            roomInfoView.AddChidren(floorView);
            rowCount++;
            btnFloorTitle = new Button()
            {
                X = Application.GetRealWidth(16),
@@ -260,6 +274,7 @@
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                Text = room.floor
            };
            floorView.AddChidren(btnFloorInfo);
            btnFloorRight = new Button()
@@ -274,40 +289,44 @@
            roomInfoView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
            #endregion
            #region 分享
            sharedView = new FrameLayout()
            if (pageTitleId != StringId.AddRoom)
            {
                Height = Application.GetRealHeight(50),
            };
            roomInfoView.AddChidren(sharedView);
            btnSharedTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(120),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.Shared,
            };
            sharedView.AddChidren(btnSharedTitle);
            btnSharedInfo = new Button()
            {
                X = Application.GetRealWidth(100),
                Width = Application.GetRealWidth(230),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
            };
            sharedView.AddChidren(btnSharedInfo);
            btnSharedRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            sharedView.AddChidren(btnSharedRight);
            roomInfoView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
                sharedView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(50),
                };
                roomInfoView.AddChidren(sharedView);
                rowCount++;
                btnSharedTitle = new Button()
                {
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(120),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextID = StringId.Shared,
                };
                sharedView.AddChidren(btnSharedTitle);
                btnSharedInfo = new Button()
                {
                    X = Application.GetRealWidth(100),
                    Width = Application.GetRealWidth(230),
                    TextAlignment = TextAlignment.CenterRight,
                    TextColor = CSS_Color.PromptingColor1,
                    TextSize = CSS_FontSize.TextFontSize,
                };
                sharedView.AddChidren(btnSharedInfo);
                btnSharedRight = new Button()
                {
                    X = Application.GetRealWidth(339),
                    Gravity = Gravity.CenterVertical,
                    Width = Application.GetMinRealAverage(16),
                    Height = Application.GetMinRealAverage(16),
                    UnSelectedImagePath = "Public/Right.png",
                };
                sharedView.AddChidren(btnSharedRight);
                roomInfoView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
            }
            #endregion
            #region 功能管理
            functionManagemantView = new FrameLayout()
@@ -315,6 +334,7 @@
                Height = Application.GetRealHeight(50),
            };
            roomInfoView.AddChidren(functionManagemantView);
            rowCount++;
            btnFunctionManagementTitle = new Button()
            {
                X = Application.GetRealWidth(16),
@@ -336,19 +356,25 @@
            functionManagemantView.AddChidren(btnFunctionManagementRight);
            #endregion
            roomInfoView.Height = Application.GetRealHeight(51 * rowCount);
            btnOption = new Button()
            {
                Y = Application.GetRealHeight(617),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                TextAlignment = TextAlignment.Center,
                TextColor = this.pageTitleId == StringId.AddRoom ? CSS_Color.MainColor : CSS_Color.WarningColor,
                TextID = this.pageTitleId == StringId.AddRoom ? StringId.Save : StringId.DelRoom
                TextID = this.pageTitleId == StringId.AddRoom ? StringId.Save : StringId.DeleteRoom,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            bodyView.AddChidren(btnOption);
            if (MainPage.Increase)
            {
                btnOption.Y = Application.GetRealHeight(607);
                btnOption.Height = Application.GetRealHeight(60);
            }
            LoadEventList();
        }
@@ -360,7 +386,7 @@
        {
            pictureOptionView = new FrameLayout()
            {
                BackgroundColor = 0x99000000,
                BackgroundColor = CSS_Color.DialogTransparentColor1,
            };
            bodyView.AddChidren(pictureOptionView);
@@ -372,6 +398,7 @@
                Height = Application.GetRealHeight(150),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
                AnimateSpeed = 0.3f,
                Animate = Animate.DownToUp,
            };
            pictureOptionView.AddChidren(optionView);
@@ -409,7 +436,7 @@
                TextColor = CSS_Color.TextualColor,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.TakePicture,
                TextID = StringId.Album,
            };
            optionView.AddChidren(btnAlbum);