Exemplo n.º 1
0
        /// <summary>
        /// Injects a wheel in the bot window.
        /// </summary>
        /// <param name="wheel">Wheel key.</param>
        /// <param name="amount">The amount of wheeling.</param>
        public void Wheel(Keys.Wheel wheel, int amount)
        {
            int vert = 0, hort = 0;

            switch (wheel)
            {
            case Keys.Wheel.DOWN:
                vert += amount;
                break;

            case Keys.Wheel.LEFT:
                hort -= amount;
                break;

            case Keys.Wheel.RIGHT:
                hort += amount;
                break;

            case Keys.Wheel.UP:
                vert -= amount;
                break;
            }

            _browser.GetBrowserHost().SendMouseWheelEvent(_mouseEvent.X, _mouseEvent.Y, hort, vert, CefEventFlags.None);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Injects a mouse wheel event in the bot window.
 /// </summary>
 /// <param name="direction">The direction where to scroll.</param>
 /// <param name="amount">The amount of wheeling.</param>
 public static void Scroll(Keys.Wheel direction = Keys.Wheel.DOWN, int amount = 1)
 {
     _mouse.Wheel(direction, amount);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Injects a mouse wheel event in the bot window.
 /// </summary>
 /// <param name="wheel">Wheel key.</param>
 /// <param name="amount">The amount of wheeling.</param>
 public static void Wheel(Keys.Wheel wheel, int amount)
 {
     _mouse.Wheel(wheel, amount);
 }