Ejemplo n.º 1
0
 internal static ListFriends GetFriend(ulong steamId)
 {
     lock (ListFriends.locker)
     {
         ListFriends listFriends = ListFriends.list.Find((Predicate <ListFriends>)(x => (long)x.SID == (long)steamId));
         if (listFriends != null)
         {
             if (listFriends.status == "LookingToTrade")
             {
                 return new ListFriends(listFriends.Name, listFriends.SID, listFriends.Game, listFriends.Status, listFriends.LastLogOff)
                        {
                            status = "Looking to Trade"
                        }
             }
             ;
             if (listFriends.status == "LookingToPlay")
             {
                 return new ListFriends(listFriends.Name, listFriends.SID, listFriends.Game, listFriends.Status, listFriends.LastLogOff)
                        {
                            status = "Looking to Play"
                        }
             }
             ;
         }
         return(listFriends);
     }
 }
Ejemplo n.º 2
0
 public static void Add(string name, ulong sid, string game = "", string status = "Offline", string lastlogoff = "")
 {
     lock (ListFriends.locker)
     {
         ListFriends listFriends = new ListFriends(name, sid, game, status, lastlogoff);
         ListFriends.list.Add(listFriends);
     }
 }
Ejemplo n.º 3
0
 public static void Remove(ulong sid)
 {
     lock (ListFriends.locker)
     {
         ListFriends listFriends = ListFriends.list.Find((Predicate <ListFriends>)(x => (long)x.SID == (long)sid));
         ListFriends.list.Remove(listFriends);
     }
 }