示例#1
0
 private static void CreateListOfLoginUserFriends()
 {
     s_ListOfFriendsOfTheLoginUser = new List <InfoFriend>();
     foreach (User user in s_UserInstance.Friends)
     {
         InfoFriend infoFriend = new InfoFriend();
         infoFriend.Name          = user.Name;
         infoFriend.BirthDay      = user.Birthday;
         infoFriend.Gender        = User.eGender.female == user.Gender ? "female" : "male";
         infoFriend.AmountOfLikes = 0;
         infoFriend.Picture       = user.PictureNormalURL;
         infoFriend.Locale        = user.Locale;
         infoFriend.Email         = user.Email;
         infoFriend.Religion      = user.Religion;
         s_ListOfFriendsOfTheLoginUser.Add(infoFriend);
     }
 }
        public int CompareTo(object obj)
        {
            InfoFriend other = (InfoFriend)obj;

            if (this.AmountOfLikes > other.AmountOfLikes)
            {
                return(1);
            }
            else if (this.AmountOfLikes < other.AmountOfLikes)
            {
                return(-1);
            }
            else
            {
                return(0);
            }
        }