public List<Match> FindAll(PatternBase pattern) { Clock.Start(); double timeout = autoWaitTimeout * 1000; List<Match> ms = new List<Match>(); while (Clock.Tick() < timeout) { ms = pattern.FindAll(this); if (ms.Count != 0) { return ms; } Wait(WaitScanRate); } throw new FindFailException(pattern.ToString()); }
public static void IsNotExisted(Region r,PatternBase pattern) { IsTrue(r.Find(pattern) == null, "{0} is existed!", pattern.ToString()); }
public Match Find(PatternBase pattern) { Clock.Start(); double timeout = autoWaitTimeout * 1000; Match m = null; while (Clock.Tick() < timeout) { m = pattern.Find(this); if (m != null) { return m; } Wait(WaitScanRate); } throw new FindFailException(pattern.ToString()); }