예제 #1
0
        /// <summary>
        /// Injects a mouse move in the bot window.
        /// </summary>
        /// <param name="x">X coordinate where to move.</param>
        /// <param name="y">Y coordinate where to move.</param>
        public void Move(int x, int y)
        {
            Bot.ExeThreadSafe(delegate
            {
                _position   = new Point(x, y);
                _mouseEvent = new CefSharp.MouseEvent(x, y, CefEventFlags.None);

                if (_browser.GetMainFrame().IsMain)
                {
                    _browser.GetBrowserHost().SendMouseMoveEvent(_mouseEvent, false);
                }
            });
        }
예제 #2
0
 internal ChromiumMouse(ChromiumWebBrowser browser)
 {
     _browser    = browser;
     _position   = new Point(0, 0);
     _mouseEvent = new CefSharp.MouseEvent();
 }