示例#1
0
        private static WindowVisualState UiaGetWindowVisualState(ProdWindow control)
        {
            WindowVisualState retVal = WindowPatternHelper.GetVisualState(control.UIAElement);

            LogController.ReceiveLogMessage(new LogMessage(retVal.ToString()));
            return(retVal);
        }
示例#2
0
 /// <summary>
 /// Gets the WindowVisualState of the current window
 /// </summary>
 /// <param name="windowHandle">NativeWindowHandle to window</param>
 /// <returns>
 /// The <see cref="WindowVisualState"/>
 /// </returns>
 /// <exception cref="ProdOperationException">Examine inner exception</exception>
 public static WindowVisualState WindowGetVisualState(IntPtr windowHandle)
 {
     try
     {
         return(WindowPatternHelper.GetVisualState(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);
     }
 }