Example #1
0
        private static bool UiaWaitForInputIdle(ProdWindow baseControl, int delay)
        {
            bool retVal = WindowPatternHelper.WaitForInputIdle(baseControl.UIAElement, delay);

            LogController.ReceiveLogMessage(new LogMessage(retVal.ToString()));
            return(retVal);
        }
Example #2
0
 /// <summary>
 /// Causes the calling code to block for the specified time or until the associated process enters an idle state, whichever completes first
 /// </summary>
 /// <param name="windowHandle">NativeWindowHandle to window</param>
 /// <param name="delay">Time, in milliseconds to wait for an idle state</param>
 /// <returns>
 /// true if the window has entered the idle state; false if the timeout occurred
 /// </returns>
 /// <exception cref="ProdOperationException">Examine inner exception</exception>
 public static bool WindowWaitForIdle(IntPtr windowHandle, int delay)
 {
     try
     {
         bool retVal = WindowPatternHelper.WaitForInputIdle(AutomationElement.FromHandle(windowHandle), delay);
         return(retVal);
     }
     catch (InvalidOperationException err)
     {
         throw new ProdOperationException(err.Message, err);
     }
     catch (ElementNotAvailableException err)
     {
         throw new ProdOperationException(err.Message, err);
     }
     catch (ArgumentException err)
     {
         throw new ProdOperationException(err.Message, err);
     }
 }