private void ShowFriendOperatorWith() { if (selectedOperator == "Все" || selectedOperator == null) { return; } PhoneOperator phoneOperator = null; foreach (var item in PhoneOperators) { if (item.Name == selectedOperator) { phoneOperator = item; } } if (phoneOperator == null) { return; } var tempList = CopyCollection(FriendsList); FriendsList.Clear(); foreach (var friend in tempList) { if (phoneOperator.IsCodeContains(friend.NumberCode)) { FriendsList.Add(friend); } } }
public void BnetFriendReceived(BnetFriend friend) { DispatcherHelper.CheckBeginInvokeOnUI(() => { FriendsList.Add(friend); }); }
private void ShowFriendSelectedMonth() { if (selectedMonth == "Все" || selectedMonth == null) { return; } int month; try { month = Convert.ToInt32(selectedMonth); } catch { return; } var tempList = CopyCollection(FriendsList); FriendsList.Clear(); foreach (var friend in tempList) { if (friend.Month == month) { FriendsList.Add(friend); } } }
public async Task AddFriendToFriendsListAsync(User user) { DependencyService.Get <IFirebaseDatabase>().AddFriend(user); await App.Current.MainPage.DisplayAlert("Successful Message", "New friend added", "Ok"); FriendsList.Add(user); }
// your request for friendship accepted private async void FriendshipAccepted(string login, DateTime time) { await System.Threading.Tasks.Task.Run(() => System.Threading.Thread.Sleep(Properties.Settings.Default.ActionDelayMsec)); if (FriendsList.FirstOrDefault(x => x.Name.Equals(login)) == null) { FriendsList.Add(new Friend(client, login, true)); } }
/// <summary> /// 添加好友 /// </summary> /// <returns></returns> public void AddFriend(int uid) { FriendData fd = FriendsList.Find(t => (t.UserId == uid)); if (fd == null) { fd = new FriendData() { UserId = uid, IsGiveAway = false }; FriendsList.Add(fd); } }
private void ShowFriendsWithNumber() { if (isWithNumberOnly) { var tempList = CopyCollection(FriendsList); FriendsList.Clear(); foreach (var friend in tempList) { if (friend.Number != 0) { FriendsList.Add(friend); } } } }
public async void UpdateFollowedUsers() { FriendsList.Clear(); var user = App.User; foreach (var friendId in user.GetFollowedUsers()) { var friend = await UserManager.Instance.GetUsersWhere(x => x.ID == friendId); if (friend[0] != null) { var friendToAdd = friend[0]; FriendsList.Add(friendToAdd); } } }
public void isFriendOf(Person p) { FriendsList.Add(p); }
public void addFriend(Member friend) { FriendsList.Add(friend); //FriendsList.Add(new Friendship(friend)); }