| | |
| | | // funss.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<ShareData>(CommonPage.MyEncodingUTF8.GetString(sd.ShareDataBytes))); |
| | | // } |
| | | //} |
| | | foreach (var room in DB_ResidenceData.residenceData.rooms) |
| | | foreach (var room in DB_ResidenceData.rooms) |
| | | { |
| | | var roomView = new FrameLayout() |
| | | { |
| | |
| | | int addCount = 0; |
| | | foreach (var sd in memberInfo.CurResidenceShareDate) |
| | | { |
| | | if (room.functions.Find((obj) => obj.sid == sd.ShareName) != null) |
| | | if (room.GetRoomFunctions(false).Find((obj) => obj.sid == sd.ShareName) != null) |
| | | { |
| | | addCount++; |
| | | } |
| | |
| | | for(int i= 0;i< memberInfo.CurResidenceShareDate.Count;) |
| | | { |
| | | var sd = memberInfo.CurResidenceShareDate[i]; |
| | | if (DB_ResidenceData.residenceData.functionList.functions.Find((obj) => obj.sid == sd.ShareName) == null) |
| | | if (DB_ResidenceData.functionList.GetAllFunction().Find((obj) => obj.sid == sd.ShareName) == null) |
| | | { |
| | | new DAL.Server.HttpServerRequest().DeleteShareData(sd); |
| | | memberInfo.CurResidenceShareDate.Remove(sd); |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Text = addCount + "/" + room.functions.Count.ToString(), |
| | | Text = addCount + "/" + room.GetRoomFunctions(false).Count.ToString(), |
| | | }; |
| | | roomView.AddChidren(btnFunctionCount); |
| | | |
| | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | Action<string> refreshFunctionCount = (newCount) => { |
| | | btnFunctionCount.Text = newCount + "/" + room.functions.Count.ToString(); |
| | | btnFunctionCount.Text = newCount + "/" + room.GetRoomFunctions(false).Count.ToString(); |
| | | }; |
| | | var mmp = new MemberFunctionPermissionPage(memberInfo, room,refreshFunctionCount); |
| | | MainPage.BasePageView.AddChidren(mmp); |
| | |
| | | btnRoomName.MouseUpEventHandler = eHandler; |
| | | btnRight.MouseUpEventHandler = eHandler; |
| | | |
| | | if (DB_ResidenceData.residenceData.rooms.IndexOf(room) < DB_ResidenceData.residenceData.rooms.Count - 2) |
| | | if (DB_ResidenceData.rooms.IndexOf(room) < DB_ResidenceData.rooms.Count - 2) |
| | | { |
| | | var btnRoomLine = new Button() |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | if (DB_ResidenceData.residenceData.rooms.Count > 10) |
| | | if (DB_ResidenceData.rooms.Count > 10) |
| | | { |
| | | roomListView.ScrollEnabled = true; |
| | | } |