コード例 #1
0
ファイル: IE8Elements.cs プロジェクト: angellcq/src
 /// <summary>
 /// Is the focused element the search textbox?
 /// </summary>
 /// <param name="focusedElement">The control in focus</param>
 /// <returns>true if it is</returns>
 public bool IsSearchControl(AutomationElement focusedElement)
 {
     return(focusedElement != null &&
            String.Compare(focusedElement.Current.ClassName, "Edit", true) == 0 &&
            String.Compare(focusedElement.Current.ControlType.ProgrammaticName, "ControlType.Edit", true) == 0 &&
            AgentUtils.IsAncestorByName(focusedElement, "Search Control", "ControlType.Pane", ""));
 }
コード例 #2
0
ファイル: IE8Elements.cs プロジェクト: angellcq/src
 /// <summary>
 /// Is the focused element the Favorites window?
 /// </summary>
 /// <param name="focusedElement">The control in focus</param>
 /// <returns>true if it is</returns>
 public bool IsFavoritesWindow(AutomationElement focusedElement)
 {
     return(focusedElement != null &&
            AgentUtils.IsAncestorByName(focusedElement, "SysTreeView32", "ControlType.Tree", "Favorites"));
 }