wxr
2021-07-01 adc150efb13a0506f45a3c344c3ee2ef2dba8e90
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPage.cs
@@ -5,6 +5,12 @@
namespace HDL_ON.UI
{
    /*
     时间:20200915
     删除分享操作,分享操作只在成员管理界面实现
     */
    public partial class RoomEditPage : FrameLayout
    {
        #region 控件列表
@@ -60,22 +66,22 @@
        /// 房间楼层修改跳转按钮
        /// </summary>
        Button btnFloorRight;
        /// <summary>
        /// 分享row
        /// </summary>
        FrameLayout sharedView;
        /// <summary>
        /// 分享标题
        /// </summary>
        Button btnSharedTitle;
        /// <summary>
        /// 分享的信息
        /// </summary>
        Button btnSharedInfo;
        /// <summary>
        /// 分享信息跳转按钮
        /// </summary>
        Button btnSharedRight;
        ///// <summary>
        ///// 分享row
        ///// </summary>
        //FrameLayout sharedView;
        ///// <summary>
        ///// 分享标题
        ///// </summary>
        //Button btnSharedTitle;
        ///// <summary>
        ///// 分享的信息
        ///// </summary>
        //Button btnSharedInfo;
        ///// <summary>
        ///// 分享信息跳转按钮
        ///// </summary>
        //Button btnSharedRight;
        /// <summary>
        /// 功能管理区域
        /// </summary>
@@ -125,34 +131,44 @@
        #endregion
        Room room;
        int pageTitleId;
        int rowCount = 1;
        Action backAction;
        public RoomEditPage(Room r, int tId,Action action)
        /// <summary>
        /// 删除房间事件
        /// 2020-12-02 解决删除房间后,界面不刷新删除房间问题
        /// </summary>
        Action deleteAction;
        /// <summary>
        /// 图片修改事件
        /// </summary>
        Action modifyImageAction;
        /// <summary>
        ///
        /// </summary>
        /// <param name="r"></param>
        /// <param name="action"></param>
        /// <param name="delAction">房间删除事件</param>
        /// <param name="modifyImageAction">房间背景图修改事件回调</param>
        public RoomEditPage(Room r, Action action, Action delAction, Action modifyImageAction)
        {
            bodyView = this;
            room = r;
            pageTitleId = tId;
            backAction = action;
            this.deleteAction = delAction;
            this.modifyImageAction = modifyImageAction;
        }
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            if (pageTitleId == StringId.AddRoom)
            {
                new TopViewDiv(bodyView, Language.StringByID(pageTitleId)).LoadTopView();
            }
            else
            {
                new TopViewDiv(bodyView, Language.StringByID(pageTitleId)).LoadTopView(backAction);
            }
            new TopViewDiv(bodyView, Language.StringByID(StringId.EditRoomInfo)).LoadTopView(backAction);
            roomBgView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(224),
                Height = Application.GetRealWidth(232),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(roomBgView);
@@ -162,13 +178,16 @@
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealWidth(20),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(184),
                Height = Application.GetRealWidth(192),//2020-12-01 房间图片比例改回16:9
                //UnSelectedImagePath = room.backgroundImage,
                ImagePath = room.backgroundImage,
                //ImagePath = room.backgroundImage,
                Radius = (uint)Application.GetRealWidth(12),
                //Radius = (uint)Application.GetRealWidth(6),
            };
            roomBgView.AddChidren(btnRoomBg);
            //2020-12-03 修改图片加载方法
            ImageUtlis.Current.LoadLocalOrNetworkImages(room.backgroundImage, btnRoomBg);
            //房间信息编辑区域
            roomInfoView = new VerticalScrolViewLayout()
@@ -219,7 +238,7 @@
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                Text = room.name
                Text = room.roomName
            };
            roomNameRow.AddChidren(btnRoomName);
@@ -273,44 +292,45 @@
            roomInfoView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
            #endregion
            #region 分享
            if (pageTitleId != StringId.AddRoom)
            {
                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 });
            }
            //if (pageTitleId != StringId.AddRoom)
            //{
            //    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()
@@ -322,7 +342,7 @@
            btnFunctionManagementTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(120),
                Width = Application.GetRealWidth(220),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
@@ -348,8 +368,8 @@
                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.DeleteRoom,
                TextColor = CSS_Color.WarningColor,
                TextID = StringId.DeleteRoom,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            bodyView.AddChidren(btnOption);