Exemplo 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();
 }
Exemplo n.º 2
0
        public static PaginatedList <T, TSearch> Create(IEnumerable <T> source, int pageIndex, int pageSize, ISearchObject searchObject)
        {
            var count = source.Count();
            var items = source;

            return(new PaginatedList <T, TSearch>(items, count, pageIndex, pageSize, searchObject));
        }
Exemplo n.º 3
0
 public PaginatedList(IEnumerable <T> items, int count, int pageIndex, int pageSize, ISearchObject searchObject)
 {
     PageIndex    = pageIndex;
     SearchObject = searchObject as TSearch;
     TotalPages   = (int)Math.Ceiling(count / (double)pageSize);
     this.AddRange(items);
 }