Example #1
0
        public bool MyResult(Point point, int counter)
        {
            Bitmap target = CaptureScreen();

            target.Save("test.bmp");
            if (SearchImage.Find(target, Properties.Resources.winningNumber, out Point _).IsEmpty)
            {
                return(false);
            }

            DoClick(MouseOperations.MouseEventFlags.LeftDown, point.X, point.Y, counter);
            Sleep(15000);
            return(true);
        }
Example #2
0
        private Bitmap CaptureScreen()
        {
            Screen screen = Screen.FromControl(this);

            return(SearchImage.CaptureWindow(SearchImage.GetDesktopWindow(), screen.Bounds.Width, screen.Bounds.Height));
        }