Пример #1
0
 public MainScanItem(saveTab scanParams, CookieContainer cookie, eventDelegate deleg, bool ignoreWarn, int resDel)
 {
     Steam.scanInput     = scanParams;
     Steam.NotSetHead    = (scanParams.Name == string.Empty);
     Steam.delegMessage += deleg;
     Steam.cookieCont    = cookie;
     //Steam.currencies.Current = currency;
     Steam.IgnoreWarn  = ignoreWarn;
     Steam.resellDelay = resDel;
 }
Пример #2
0
 static bool isScanValid(saveTab item, bool isMain)
 {
     if (isMain)
     {
         return(item.Price != string.Empty && item.Link.Contains(SteamSite._market) && item.Name != string.Empty);
     }
     else
     {
         return(item.Price != string.Empty && item.Name != string.Empty);
     }
 }
Пример #3
0
 //copy constructor
 public saveTab(saveTab tocopy)
 {
     this.Name        = tocopy.Name;
     this.Price       = tocopy.Price;
     this.Link        = tocopy.Link;
     this.ImgLink     = tocopy.ImgLink;
     this.Delay       = tocopy.Delay;
     this.BuyQnt      = tocopy.BuyQnt;
     this.ToBuy       = tocopy.ToBuy;
     this.ResellType  = tocopy.ResellType;
     this.ResellPrice = tocopy.ResellPrice;
     this.StatId      = tocopy.StatId;
 }
Пример #4
0
        public int BuyLogic(int wished, string sessid, ScanItem ourItem, saveTab Input, int buyCont, bool ismain)
        {
            int    total    = ourItem.Price + ourItem.Fee;
            string totalStr = total.ToString();

            if (total <= wished)
            {
                if (Input.ToBuy)
                {
                    var buyresp = BuyItem(cookieCont, sessid, ourItem.ListringId, Input.Link, ourItem.Price.ToString(), ourItem.Fee.ToString(), totalStr);

                    if (buyresp.Succsess)
                    {
                        //Resell
                        if (Input.ResellType != 0)
                        {
                            StartResellThread(totalStr, Input.ResellPrice, ourItem.Type, ourItem.ItemName, Input.ResellType);
                        }

                        doMessage(flag.Success_buy, scanID, buyresp.Mess, ismain);
                        doMessage(flag.Price_btext, scanID, totalStr, ismain);

                        buyCont++;

                        //Bloody hell, you're f****n' genious!
                        if (buyCont == Input.BuyQnt)
                        {
                            Input.ToBuy = false;
                            doMessage(flag.Send_cancel, scanID, string.Empty, ismain);
                        }

                        return(buyCont);
                    }

                    else
                    {
                        doMessage(flag.Error_buy, scanID, buyresp.Mess, ismain);
                    }
                }
                else
                {
                    doMessage(flag.Price_htext, scanID, totalStr, ismain);
                }
            }
            else
            {
                doMessage(flag.Price_text, scanID, totalStr, ismain);
            }

            return(buyCont);
        }