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); }
private Bitmap CaptureScreen() { Screen screen = Screen.FromControl(this); return(SearchImage.CaptureWindow(SearchImage.GetDesktopWindow(), screen.Bounds.Width, screen.Bounds.Height)); }