| | |
| | | |
| | | #endregion |
| | | Room room; |
| | | int pageTitleId; |
| | | int rowCount = 1; |
| | | Action backAction; |
| | | |
| | |
| | | /// 2020-12-02 解决删除房间后,界面不刷新删除房间问题 |
| | | /// </summary> |
| | | Action deleteAction; |
| | | /// <summary> |
| | | /// 图片修改事件 |
| | | /// </summary> |
| | | Action modifyImageAction; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="r"></param> |
| | | /// <param name="tId"></param> |
| | | /// <param name="action"></param> |
| | | /// <param name="delAction">删除房间事件</param> |
| | | public RoomEditPage(Room r, int tId, Action action, Action delAction) |
| | | /// <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() |
| | | { |
| | |
| | | Width = Application.GetRealWidth(343), |
| | | 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() |
| | |
| | | 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, |
| | |
| | | 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); |