예제 #1
0
        public void Run()
        {
            bool decreasing = false;

            while (CurrentMinPrice >= 200 && CurrentMinPrice <= 650)
            {
                if (!decreasing && CurrentMinPrice < 650)
                {
                    MouseActions.PerformClick(Enums.ButtonTypes.IncreaseMin);
                    CurrentMinPrice += 50;
                }

                if (CurrentMinPrice == 650)
                {
                    decreasing = true;
                }

                if (decreasing)
                {
                    MouseActions.PerformClick(Enums.ButtonTypes.DecreaseMin);
                    CurrentMinPrice -= 50;
                }

                if (CurrentMinPrice == 200)
                {
                    decreasing = false;
                }

                MouseActions.PerformClick(Enums.ButtonTypes.Search);

                MouseActions.BringConsoleToFront();

                Console.WriteLine("Press 1 to Buy. Press 0 to Search Again.");
                var response = Convert.ToInt32(Console.ReadLine());

                if (response == 1)
                {
                    MouseActions.PerformClick(Enums.ButtonTypes.BuyPlusConfirm);
                }
                else
                {
                    MouseActions.PerformClick(Enums.ButtonTypes.BackButton);
                }
            }
        }
예제 #2
0
 public Controller()
 {
     MouseActions    = new MouseActions();
     CurrentMinPrice = 200;
 }