Exemplo n.º 1
0
        private void FetchFriends()
        {
            var friendsids = GetFriendsIDs();

            friends = new SteamID[friendsids.Length];
            for (int i = 0; i < friendsids.Length; i++)
            {
                friends[i] = SteamID.Create(friendsids[i], false);
            }
        }
Exemplo n.º 2
0
        public bool FetchMembers(bool cache)
        {
            int page = 0;
            int totalPages;

            List <SteamID> members = new List <SteamID>();

            try {
                do
                {
                    page++;

                    XmlDocument doc = new XmlDocument();
                    doc.LoadUrl(BaseUrl + "/memberslistxml?p=" + page);

                    totalPages = int.Parse(doc.GetInnerText("totalPages"));

                    if (page == 1)
                    {
                        GroupID64 = long.Parse(doc.GetInnerText("groupID64"));
                        if (cache)
                        {
                            Cache();
                        }
                    }

                    foreach (XmlElement bla in doc.GetElementsByTagName("members").Item(0))
                    {
                        members.Add(SteamID.Create(long.Parse(bla.InnerText), false));
                    }
                } while (page < totalPages);
            } catch (XmlException) {
                return(false);
            } catch (Exception e) {
                throw e;
            }

            this.members = members.ToArray();

            FetchTime = DateTime.Now;
            return(true);
        }
Exemplo n.º 3
0
 public static SteamID Create(string id, bool fetch, bool cache)
 {
     return(SteamID.Create((object)id.ToLower(), fetch, cache));
 }
Exemplo n.º 4
0
 public static SteamID Create(long id, bool fetch, bool cache)
 {
     return(SteamID.Create((object)id, fetch, cache));
 }
Exemplo n.º 5
0
 public static SteamID Create(string id, bool fetch)
 {
     return(SteamID.Create(id, fetch, true));
 }
Exemplo n.º 6
0
 public static SteamID Create(string id)
 {
     return(SteamID.Create(id, true, true));
 }