public static void HighlightRect(Rect rect, Color?color = null) { HighlightRectangle highlight = ShowHighlightRectangle(rect, color); for (int i = 0; i < 3; i++) { highlight.Visible = true; Thread.Sleep(200); highlight.Visible = false; Thread.Sleep(200); } }
public static void HighlightRect(System.Drawing.Rectangle rect, Color?color = null) { Rect rc = new Rect((double)rect.Left, (double)rect.Top, (double)rect.Width, (double)rect.Height); HighlightRectangle highlight = ShowHighlightRectangle(rc, color); for (int i = 0; i < 3; i++) { highlight.Visible = true; Thread.Sleep(200); highlight.Visible = false; Thread.Sleep(200); } }
public static HighlightRectangle ShowHighlightRectangle(Rect rect, Color?color = null) { HighlightRectangle highlightRect = HighlightRectangle.Instance; highlightRect.Init(new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height), true ); if (color != null) { highlightRect.Color = (Color)color; } return(highlightRect); }
public static HighlightRectangle HighlightThread_Spy(AutomationElement automationElement, bool infinite = false) { Rect?rect = GetRectangle(automationElement); if (rect == null) { return(null); } HighlightRectangle highlightRect = ShowHighlightRectangle((Rect)rect); if (!infinite) { Thread.Sleep(500); if (highlightRect != null) { highlightRect.Visible = false; } } return(highlightRect); }