private bool WaitActive(int ms = 500, int times = 20) { while (times > 0 && WindowFinder.GetForegroundWindow() != Handle) { StaticSleeper.Sleep(ms); times--; } return(times > 0); }
public void MakeActive() { for (var i = 0; i < 12; i++) { WindowFinder.SetForegroundWindow(Handle); if (!WaitActive()) { continue; } Screen.Dirty(); StaticSleeper.Sleep(500); return; } throw new Exception("Window never opened!"); }
protected string GetWindowText() { return(WindowFinder.GetWindowText(Handle)); }