Exemplo n.º 1
0
 private bool WaitActive(int ms = 500, int times = 20)
 {
     while (times > 0 && WindowFinder.GetForegroundWindow() != Handle)
     {
         StaticSleeper.Sleep(ms);
         times--;
     }
     return(times > 0);
 }
Exemplo n.º 2
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!");
 }
Exemplo n.º 3
0
 protected string GetWindowText()
 {
     return(WindowFinder.GetWindowText(Handle));
 }