| | |
| | | |
| | | ResidenceMemberInfo memberInfo; |
| | | |
| | | Room room; |
| | | |
| | | Action<string> refreshFunctionCount; |
| | | /// <summary> |
| | | /// 当前的房间roomId |
| | | /// 如果为空,则代表管理无分配区域的功能分享 |
| | | /// </summary> |
| | | string roomId; |
| | | /// <summary> |
| | | /// 房间所有功能列表 |
| | | /// </summary> |
| | | List<Function> roomFunctionList = new List<Function>(); |
| | | |
| | | /// <summary> |
| | | /// 之前的分享列表 |
| | | /// 刷新回调Action |
| | | /// </summary> |
| | | List<ShareData> funs; |
| | | Action refreshAction; |
| | | /// <summary> |
| | | /// 当前账号的所有分享列表 |
| | | /// </summary> |
| | | List<ShareData> curResidenceShareData; |
| | | /// <summary> |
| | | /// 属于当前房间最终的设备分享列表 |
| | | /// </summary> |
| | | List<ShareData> funs_New; |
| | | List<ShareData> funs_RoomAll; |
| | | //shareDataList = new List<ShareData>(); |
| | | /// <summary> |
| | | /// 删除的分享列表 |
| | | /// </summary> |
| | | List<ShareData> funs_Del; |
| | | |
| | | public MemberFunctionPermissionPage(ResidenceMemberInfo mInfo, Room r, Action<string> action) |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="mInfo"></param> |
| | | /// <param name="roomFunctionList"></param> |
| | | /// <param name="roomId"></param> |
| | | /// <param name="refreshAction"></param> |
| | | public MemberFunctionPermissionPage(ResidenceMemberInfo mInfo, List<Function> roomFunctionList, List<ShareData> funs_RoomAll, string roomId, Action refreshAction) |
| | | { |
| | | bodyView = this; |
| | | memberInfo = mInfo; |
| | | room = r; |
| | | funs = new List<ShareData>(); |
| | | funs = memberInfo.CurResidenceShareDate; |
| | | funs_New = new List<ShareData>(); |
| | | funs_Del = new List<ShareData>(); |
| | | |
| | | refreshFunctionCount = action; |
| | | } |
| | | |
| | | public MemberFunctionPermissionPage(Room r,List<ShareData> sd) |
| | | { |
| | | bodyView = this; |
| | | room = r; |
| | | funs = new List<ShareData>(); |
| | | funs_New = sd; |
| | | funs_Del = new List<ShareData>(); |
| | | memberInfo = new ResidenceMemberInfo(); |
| | | this.memberInfo = mInfo; |
| | | this.roomFunctionList = roomFunctionList; |
| | | this.roomId = roomId; |
| | | //this.curResidenceShareData = new List<ShareData>(); |
| | | this.curResidenceShareData = memberInfo.CurResidenceShareData; |
| | | this.funs_RoomAll = new List<ShareData>(); |
| | | this.funs_RoomAll.AddRange(funs_RoomAll); |
| | | this.funs_Del = new List<ShareData>(); |
| | | this.refreshAction = refreshAction; |
| | | } |
| | | |
| | | public void LoadPage(int tId) |
| | |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextID = titleId == StringId.PermissionToUse ? StringId.Confirm : StringId.Shared, |
| | | TextID = titleId == StringId.MemberPermissionManagement ? StringId.Confirm : StringId.Shared, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | IsBold = true, |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | |
| | | }; |
| | | bodyView.AddChidren(btnOption); |
| | | |
| | | if(titleId == StringId.PermissionToUse) |
| | | { |
| | | LoadFunctionRow(funs); |
| | | } |
| | | else |
| | | { |
| | | LoadFunctionRow(funs_New); |
| | | } |
| | | LoadFunctionRow(funs_RoomAll); |
| | | |
| | | LoadEventList(); |
| | | } |
| | | /// <summary> |
| | |
| | | void LoadFunctionRow(List<ShareData> shareDatas) |
| | | { |
| | | contentView.RemoveAll(); |
| | | foreach (var function in room.GetRoomFunctions(false)) |
| | | foreach (var function in roomFunctionList) |
| | | { |
| | | var roomView = new FrameLayout() |
| | | { |
| | |
| | | { |
| | | btnChoose.IsSelected = true; |
| | | //刷新属于当前房间的分享统计 |
| | | funs_New.Add(shareData); |
| | | //funs_New.Add(shareData); |
| | | } |
| | | else |
| | | { |