예제 #1
0
파일: UIItem.cs 프로젝트: timotei/White
 /// <summary>
 /// Implements <see cref="IUIItem.Focus"/>
 /// </summary>
 public virtual void Focus()
 {
     actionListener.ActionPerforming(this);
     try
     {
         automationElement.Focus();
         ActionPerformed();
     }
     catch
     {
         Logger.Debug("Could not set focus on " + AutomationElement.Display());
     }
 }
예제 #2
0
 public virtual void DoubleClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
 {
     actionListener.ActionPerforming(uiItem);
     ToolTip toolTip = GetToolTip(uiItem, actionListener);
     if (toolTip == null)
         mouse.DoubleClick(uiItem.Bounds.Center(), actionListener);
     else
     {
         logger.Debug("Found tooltip DoubleClicking outside tooltip bounds");
         mouse.DoubleClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
     }
 }
예제 #3
0
파일: ListItems.cs 프로젝트: timotei/White
        private void MakeLastItemReadyForPerformingAction()
        {
            if (Count == 0)
            {
                return;
            }
            ListItem lastItem = Item(Count - 1);

            if (lastItem.Bounds.IsZeroSize() || string.IsNullOrEmpty(lastItem.Text))
            {
                actionListener.ActionPerforming(lastItem);
            }
        }
예제 #4
0
        public virtual void ClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
        {
            actionListener.ActionPerforming(uiItem);
            ToolTip toolTip = GetToolTip(uiItem, actionListener);

            if (toolTip == null)
            {
                mouse.LeftClick(uiItem.Bounds.Center(), actionListener);
            }
            else
            {
                logger.Debug("Found tooltip Clicking outside tooltip bounds");
                mouse.LeftClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
            }
        }
예제 #5
0
 public virtual void RightClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
 {
     actionListener.ActionPerforming(uiItem);
     ToolTip toolTip = GetToolTip(uiItem, actionListener);
     if (toolTip == null)
     {
         //Because mouse has already been moved
         mouse.Click(MouseButton.Right, actionListener);
     }
     else
     {
         logger.Debug("Found tooltip RightClicking outside tooltip bounds");
         mouse.RightClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
     }
 }
예제 #6
0
        public virtual void RightClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
        {
            actionListener.ActionPerforming(uiItem);
            ToolTip toolTip = GetToolTip(uiItem, actionListener);

            if (toolTip == null)
            {
                //Because mouse has already been moved
                mouse.Click(MouseButton.Right, actionListener);
            }
            else
            {
                logger.Debug("Found tooltip RightClicking outside tooltip bounds");
                mouse.RightClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
            }
        }