Example #1
0
        private void StartFishing()
        {
            Debug.Write("Start Fishing");
            Thread.Sleep(2000);
            _inputSender.SendKeys(Keys.Space);

            Thread.Sleep(5000);

            WaitFishingStart();
        }
Example #2
0
        private void TryBuy()
        {
            var config   = _windowAttacher.Config.Market;
            var position = Enumerable.Range(1, 7).FirstOrDefault(CheckButtonAvailable);

            if (position == default(int))
            {
                return;
            }

            _inputSender.MouseLeftClickTo(new Point {
                X = config.MarketRow.X, Y = position * 62 + config.MarketRow.Y
            });

            Thread.Sleep(400);

            var windowType = CheckSubWindowType2();

            if (windowType == SubWindow.InfoWindow)
            {
                _inputSender.SendKeys(Keys.Enter);
                _inputSender.MouseMoveTo(new Point {
                    X = config.MarketRow.X + 100, Y = position * 62 + config.MarketRow.Y
                });
                Thread.Sleep(300);
            }
            else
            {
                _inputSender.MouseLeftClickTo(config.QuantityWindowBuy.ToPoint());
                Thread.Sleep(300);
            }
        }
Example #3
0
 private void sendMultipleKeys(System.Windows.Forms.Keys[] keys)
 {
     foreach (System.Windows.Forms.Keys currentKey in keys)
     {
         _inputSender.SendKeys(currentKey);
         Thread.Sleep(10);
     }
 }