public void AddFriend(long userId, string userUid)
        {
            UserCellData item = new UserCellData(userId, userUid);

            this.friends.Add(item);
            this.ShowMode = this.showMode;
        }
 public void AddFriends(Dictionary <long, string> FriendsIdsAndNicknames)
 {
     foreach (long num in FriendsIdsAndNicknames.Keys)
     {
         UserCellData item = new UserCellData(num, FriendsIdsAndNicknames[num]);
         this.friends.Add(item);
     }
     this.friendsLoaded = true;
     this.ShowMode      = this.showMode;
 }
예제 #3
0
        public void AddItem(long userId, string userUid, FriendType friendType)
        {
            UserCellData item = new UserCellData(userId, userUid);

            if (friendType == FriendType.Incoming)
            {
                this.incoming.Add(item);
            }
            else if (friendType != FriendType.Outgoing)
            {
                this.accepted.Add(item);
            }
            else
            {
                this.outgoing.Add(item);
            }
        }
예제 #4
0
 public void RemoveUser(long userId, bool toRight)
 {
     for (int i = 0; i < this.Items.Count; i++)
     {
         if (this.Items[i].id == userId)
         {
             UserCellData item = this.Items[i];
             this.Items.Remove(item);
             if (this.FilteredItems.Contains(item))
             {
                 int index = this.FilteredItems.IndexOf(item);
                 this.FilteredItems.RemoveAt(index);
                 base.RemoveCell(index, toRight);
             }
         }
     }
 }