Esempio n. 1
0
 public PuppetMaster(IScreenController screenController, ISearchObject searchObject, ILogger logger, bool autoRecover = false)
 {
     ScreenController             = screenController;
     MouseController              = new MouseController(searchObject.Mode);
     KeyboardController           = new KeyboardController();
     Logger                       = logger;
     SearchObject                 = searchObject;
     SearchLoadingTimer           = new Timer();
     SearchLoadingTimer.Elapsed  += SearchTimerOnElapsed;
     SearchLoadingTimer.Interval  = Convert.ToInt32(ConfigurationManager.AppSettings["SearchingMarketWaitTime"]);
     CaptchaMonitorTimer          = new Timer();
     CaptchaMonitorTimer.Elapsed += CaptchaMonitorTimerOnElapsed;
     CaptchaMonitorTimer.Interval = Convert.ToInt32(ConfigurationManager.AppSettings["CaptchaMonitorWaitTime"]);
     ProcessingInterrupted        = false;
     CurrentInterrupt             = InterruptScreen.None;
     PurchaseLoopIterations       = Convert.ToInt32(ConfigurationManager.AppSettings["purchaseLoopIterations"]);
     MsBetweenPurchaseClicks      = Convert.ToInt32(ConfigurationManager.AppSettings["purchaseLoopMsBetweenClicks"]);
     AutoRecover                  = autoRecover;
     API = new ApiProvider();
 }
Esempio n. 2
0
        private void ListOnTransferMarket(int minPrice, int maxPrice)
        {
            MouseController.PerformButtonClick(ButtonTypes.ListItemBegin);

            Thread.Sleep(2000);

            MouseController.PerformButtonClick(ButtonTypes.ListMinTxt);
            Thread.Sleep(1500);
            KeyboardController.SendInput(minPrice.ToString());

            Thread.Sleep(1000);

            MouseController.PerformButtonClick(ButtonTypes.ListMaxTxt);
            Thread.Sleep(1500);
            KeyboardController.SendInput(maxPrice.ToString());

            Thread.Sleep(1000);

            MouseController.PerformButtonClick(ButtonTypes.ListItemFinal);
        }