Exemple #1
0
        // you have ben removed from friends
        private async void RemovedFromeFriends(string login, DateTime time)
        {
            await System.Threading.Tasks.Task.Run(() =>
                                                  System.Threading.Thread.Sleep(Properties.Settings.Default.ActionDelayMsec));

            FriendsList.Remove(FriendsList.FirstOrDefault(x => x.Name.Equals(login)));
        }
        /// <summary>
        /// 删除好友
        /// </summary>
        /// <returns></returns>
        public void RemoveFriend(int uid)
        {
            FriendData fd = FriendsList.Find(t => (t.UserId == uid));

            if (fd != null)
            {
                FriendsList.Remove(fd);
            }
        }
Exemple #3
0
        public void removeFriend(Member friend)
        {
            FriendsList.Remove(friend);

            /*
             * Friendship del = null;
             * foreach(Friendship f in FriendsList)
             * {
             *  if (f.friend == newFriend)
             *      del = f;
             * }
             * FriendsList.Remove(del);
             */
        }