private ToolTip GetToolTip(UIItem uiItem, ActionListener actionListener)
 {
     mouse.Click(uiItem.Bounds.Center());
     actionListener.ActionPerformed(Action.WindowMessage);
     Thread.Sleep(CoreAppXmlConfiguration.Instance.TooltipWaitTime);
     return(ToolTip.GetFrom(uiItem.Bounds.Center()));
 }
Exemplo n.º 2
0
        public virtual void Send(string keysToType, ActionListener actionListener)
        {
            if (heldKeys.Count > 0)
            {
                keysToType = keysToType.ToLower();
            }

            CapsLockOn = false;
            foreach (char c in keysToType)
            {
                short key = VkKeyScan(c);
                if (c.Equals('\r'))
                {
                    continue;
                }

                if (ShiftKeyIsNeeded(key))
                {
                    SendKeyDown((short)KeyboardInput.SpecialKeys.SHIFT, false);
                }
                Press(key, false);
                if (ShiftKeyIsNeeded(key))
                {
                    SendKeyUp((short)KeyboardInput.SpecialKeys.SHIFT, false);
                }
                actionListener.ActionPerformed(Action.WindowMessage);
            }
        }
 private ToolTip GetToolTip(UIItem uiItem, ActionListener actionListener)
 {
     mouse.Click(uiItem.Bounds.Center());
     actionListener.ActionPerformed(Action.WindowMessage);
     Thread.Sleep(CoreAppXmlConfiguration.Instance.TooltipWaitTime);
     return ToolTip.GetFrom(uiItem.Bounds.Center());
 }
        protected virtual void Scroll(ScrollAmount amount)
        {
            if (!IsScrollable)
            {
                return;
            }
            switch (amount)
            {
            case ScrollAmount.LargeDecrement:
                ScrollPattern.SetScrollPercent(
                    ScrollPattern.Current.HorizontalScrollPercent,
                    ValidPercentage(ScrollPattern.Current.VerticalScrollPercent - ScrollPercentage));
                break;

            case ScrollAmount.SmallDecrement:
                ScrollPattern.SetScrollPercent(
                    ScrollPattern.Current.HorizontalScrollPercent,
                    ValidPercentage(ScrollPattern.Current.VerticalScrollPercent - SmallPercentage()));
                break;

            case ScrollAmount.LargeIncrement:
                ScrollPattern.SetScrollPercent(
                    ScrollPattern.Current.HorizontalScrollPercent,
                    ValidPercentage(ScrollPattern.Current.VerticalScrollPercent + ScrollPercentage));
                break;

            case ScrollAmount.SmallIncrement:
                ScrollPattern.SetScrollPercent(
                    ScrollPattern.Current.HorizontalScrollPercent,
                    ValidPercentage(ScrollPattern.Current.VerticalScrollPercent + SmallPercentage()));
                break;
            }
            actionListener.ActionPerformed(Action.Scroll);
        }
 protected virtual void Scroll(ScrollAmount amount)
 {
     if (!IsScrollable)
     {
         return;
     }
     ScrollPattern.ScrollHorizontal(amount);
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Processes action events occurring on this button
        /// by dispatching them to any registered
        /// <code>ActionListener</code> objects.
        /// <para>
        /// This method is not called unless action events are
        /// enabled for this button. Action events are enabled
        /// when one of the following occurs:
        /// <ul>
        /// <li>An <code>ActionListener</code> object is registered
        /// via <code>addActionListener</code>.
        /// <li>Action events are enabled via <code>enableEvents</code>.
        /// </ul>
        /// </para>
        /// <para>Note that if the event parameter is <code>null</code>
        /// the behavior is unspecified and may result in an
        /// exception.
        ///
        /// </para>
        /// </summary>
        /// <param name="e"> the action event </param>
        /// <seealso cref=         java.awt.event.ActionListener </seealso>
        /// <seealso cref=         java.awt.Button#addActionListener </seealso>
        /// <seealso cref=         java.awt.Component#enableEvents
        /// @since       JDK1.1 </seealso>
        protected internal virtual void ProcessActionEvent(ActionEvent e)
        {
            ActionListener listener = ActionListener;

            if (listener != null)
            {
                listener.ActionPerformed(e);
            }
        }
Exemplo n.º 7
0
 protected virtual void Scroll(ScrollAmount amount)
 {
     if (!IsScrollable)
     {
         return;
     }
     ScrollPattern.ScrollVertical(amount);
     actionListener.ActionPerformed(Action.Scroll);
 }
Exemplo n.º 8
0
        public virtual void Send(string keysToType, ActionListener actionListener)
        {
            if (heldKeys.Count > 0) keysToType = keysToType.ToLower();

            CapsLockOn = false;
            foreach (char c in keysToType)
            {
                short key = VkKeyScan(c);
                if (c.Equals('\r')) continue;

                if (ShiftKeyIsNeeded(key)) SendKeyDown((short) KeyboardInput.SpecialKeys.SHIFT, false);
                if (CtrlKeyIsNeeded(key)) SendKeyDown((short) KeyboardInput.SpecialKeys.CONTROL, false);
                if (AltKeyIsNeeded(key)) SendKeyDown((short) KeyboardInput.SpecialKeys.ALT, false);
                Press(key, false);
                if (ShiftKeyIsNeeded(key)) SendKeyUp((short) KeyboardInput.SpecialKeys.SHIFT, false);
                if (CtrlKeyIsNeeded(key)) SendKeyUp((short) KeyboardInput.SpecialKeys.CONTROL, false);
                if (AltKeyIsNeeded(key)) SendKeyUp((short) KeyboardInput.SpecialKeys.ALT, false);
            }

            actionListener.ActionPerformed(Action.WindowMessage);
        }
Exemplo n.º 9
0
 private static void ActionPerformed(ActionListener actionListener)
 {
     actionListener.ActionPerformed(new Action(ActionType.WindowMessage));
 }
Exemplo n.º 10
0
 private static void ActionPerformed(ActionListener actionListener)
 {
     actionListener.ActionPerformed(new Action(ActionType.WindowMessage));
 }
Exemplo n.º 11
0
 internal virtual void RightClickHere(ActionListener actionListener)
 {
     RightClick();
     actionListener.ActionPerformed(Action.WindowMessage);
 }
 private void ActionPerformed()
 {
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 13
0
 internal virtual void RightClickHere(ActionListener actionListener)
 {
     RightClick();
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 14
0
 protected virtual void ActionPerformed()
 {
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 15
0
 public virtual void PressSpecialKey(KeyboardInput.SpecialKeys key, ActionListener actionListener)
 {
     Send(key, true);
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 16
0
 internal virtual void HoldKey(KeyboardInput.SpecialKeys key, ActionListener actionListener)
 {
     SendKeyDown((short) key, true);
     heldKeys.Add(key);
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 17
0
 public virtual void LeaveKey(KeyboardInput.SpecialKeys key, ActionListener actionListener)
 {
     SendKeyUp((short) key, true);
     heldKeys.Remove(key);
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 18
0
 internal virtual void HoldKey(KeyboardInput.SpecialKeys key, ActionListener actionListener)
 {
     SendKeyDown((short)key, true);
     heldKeys.Add(key);
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 19
0
 public virtual void PressSpecialKey(KeyboardInput.SpecialKeys key, ActionListener actionListener)
 {
     Send(key, true);
     actionListener.ActionPerformed(Action.WindowMessage);
 }
Exemplo n.º 20
0
 public virtual void LeaveKey(KeyboardInput.SpecialKeys key, ActionListener actionListener)
 {
     SendKeyUp((short)key, true);
     heldKeys.Remove(key);
     actionListener.ActionPerformed(Action.WindowMessage);
 }