Exemple #1
0
        private static WindowInteractionState UiaGetWindowState(ProdWindow baseControl)
        {
            WindowInteractionState state = WindowPatternHelper.GetInteractionState(baseControl.UIAElement);

            LogController.ReceiveLogMessage(new LogMessage(state.ToString()));
            return(state);
        }
Exemple #2
0
 /// <summary>
 /// gets the current ready-state of the window
 /// </summary>
 /// <param name="windowHandle">NativeWindowHandle to window</param>
 /// <returns>
 /// The current <see cref="WindowInteractionState"/>
 /// </returns>
 /// <exception cref="ProdOperationException">Examine inner exception</exception>
 public static WindowInteractionState WindowGetWindowState(IntPtr windowHandle)
 {
     try
     {
         return(WindowPatternHelper.GetInteractionState(AutomationElement.FromHandle(windowHandle)));
     }
     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);
     }
 }