예제 #1
0
        private void ScreenClicked(object sender, EventArgs e)
        {
            var  ClickPos = ScreenBox.PointToClient(Cursor.Position);
            bool Verify   = VerifyRect.Contains(ClickPos);

            ClickPos = new Point(ClickPos.X + FrameRect.X, ClickPos.Y + FrameRect.Y);
            BrowserHost.ExecuteClick(ClickPos);

            if (Verify)
            {
                LoadingMode(true);
                ThreadTools.Wait(3000, true);
                if (IsCaptchaSolved())
                {
                    Close();
                }
                else
                {
                    UpdateRects();
                    LoadingMode(false);
                }
            }
            else
            {
                StatusCheck.Enabled = false;
                StatusCheck.Enabled = true;
                Clicks++;
            }
        }
예제 #2
0
        private void ScreenMouseUp(object sender, MouseEventArgs e)
        {
            var ClickPos = ScreenBox.PointToClient(Cursor.Position);

            ClickPos = new Point(ClickPos.X + ViewRectangle.X, ClickPos.Y + ViewRectangle.Y);
            if (e.Button == MouseButtons.Middle)
            {
                return;
            }

            var Button = e.Button == MouseButtons.Left ? MouseButtonType.Left : MouseButtonType.Right;

            BrowserHost.SendMouseClickEvent(new MouseEvent(ClickPos.X, ClickPos.Y, CefEventFlags.None), Button, true, 1);
        }