public void AddCompleted(object sender, UploadStringCompletedEventArgs e) { BoardType board = JsonConvert.DeserializeObject <BoardType>(e.Result); MemberCollections.Clear(); foreach (MemberType member in board.Members) { member.Visible = "Visible"; if (member.AvatarHash != null) { member.AvatarURL = string.Format(EnumUtil.GetEnumDescription(ConnectionEnum.GETConnections.UserAvatar), member.AvatarHash); member.Visible = "Collapsed"; } MemberCollections.Add(member); } IsLoading = false; Visible = "Collapsed"; }
public void RenderListPage(object sender, OpenReadCompletedEventArgs e) { DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(MemberType[])); MemberType[] members = serializer.ReadObject(e.Result) as MemberType[]; MemberCollections.Clear(); foreach (MemberType member in members) { member.Visible = "Visible"; if (member.AvatarHash != null) { member.AvatarURL = string.Format(EnumUtil.GetEnumDescription(ConnectionEnum.GETConnections.UserAvatar), member.AvatarHash); member.Visible = "Collapsed"; } MemberCollections.Add(member); } IsLoading = false; Visible = "Collapsed"; }