Exemplo n.º 1
0
 public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
Exemplo n.º 2
0
 public bool Equals(RECT Rectangle)
 {
     return Rectangle.Left == Left && Rectangle.Top == Top && Rectangle.Right == Right && Rectangle.Bottom == Bottom;
 }
Exemplo n.º 3
0
        public static bool testScreen(string screenName, RECT dimensions)
        {
            var scr = Screens[screenName];

            foreach (PatternType pix in scr)
            {
                int x = pix.x;
                int y = pix.y;

                //add offset in window to window's location on screen
                Color sample = Win32.GetPixelColor(dimensions.Left + x, dimensions.Top + y);

            #if DEBUG
                Base.Write("Test: " + screenName + "@" + x + "x" + y + " : " + pix.pixelColor.ToString() + " v " + sample.ToString());
            #endif

                if (sample != pix.pixelColor)
                {
            #if DEBUG
                    Base.Write("No Match");
            #endif
                    return false;
                }
            }
            #if DEBUG
            Base.Write("Match");
            #endif
            return true;
        }
Exemplo n.º 4
0
 public static global::System.Drawing.Rectangle ToRectangle(RECT Rectangle)
 {
     return Rectangle.ToRectangle();
 }