コード例 #1
0
        public void ScanCSGOMarket()
        {
            scanCSGOMarket = true;

            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                try
                {
                    while (scanCSGOMarket)
                    {
                        string response = null;
                        for (int i = csgoItemMarketIndex; i < csgoItemsName.Count; i++)
                        {
                            string itemName       = csgoItemsName[i];
                            response              = Fetch(baseURL + itemName, "GET", null, true, "", true);
                            SteamMarket.Item item = new SteamMarket.Item(itemName, response);
                            UpdateItem(item);
                            csgoItemMarketIndex++;
                            Thread.Sleep(3000);
                        }
                    }
                }
                catch (Exception e)
                {
                    if (e.HResult == 500)
                    {
                        csgoItemMarketIndex++;
                        ScanCSGOMarket();
                    }
                }
            }).Start();

            ScanCSGOMarket();
        }
コード例 #2
0
        //private readonly int port;
        //private readonly IPAddress ip;

        public EventArgItemScanned(SteamMarket.Item item)
        {
            this.item = item;

            /*IPEndPoint ipendpoint = ((IPEndPoint)socket.RemoteEndPoint);
             *
             * ip = ipendpoint.Address;
             * port = ipendpoint.Port;*/
        }
コード例 #3
0
 public void AddCSGOItem(string name, string lastupdate, int quantity, double value)
 {
     SteamMarket.Item item = new SteamMarket.Item(name, lastupdate, quantity, value, 730);
     Items.Add(item);
     AddItemToCSGOscan(name);
 }