Пример #1
0
        protected override void Execute(CodeActivityContext context)
        {
            var el = Element.Get(context);

            if (el == null)
            {
                throw new ArgumentException("element cannot be null");
            }
            var doubleClick = false;

            if (DoubleClick != null)
            {
                doubleClick = DoubleClick.Get(context);
            }
            TimeSpan timeout = TimeSpan.FromSeconds(0);
            //if (Timeout != null) timeout = Timeout.Get(context);
            var button = Button.Get(context);

            var virtualClick = false;

            if (VirtualClick != null)
            {
                virtualClick = VirtualClick.Get(context);
            }
            // if (button != (int)Input.MouseButton.Left) { VirtualClick = false; }

            //var flabuttun = (FlaUI.Core.Input.MouseButton)Enum.Parse(typeof(FlaUI.Core.Input.MouseButton), button.ToString(), true);
            //el.Click(AnimateMouse.Get(context), flabuttun, doubleClick, OffsetX, OffsetY, timeout, virtualClick);
            var _button = (Input.MouseButton)button;

            el.Click(virtualClick, _button, OffsetX, OffsetY);
        }
Пример #2
0
        protected override void Execute(CodeActivityContext context)
        {
            var el = Element.Get(context);

            if (el == null)
            {
                throw new ArgumentException("element cannot be null");
            }
            var doubleclick = false;

            if (DoubleClick != null)
            {
                doubleclick = DoubleClick.Get(context);
            }
            var button       = Button.Get(context);
            var virtualClick = false;

            if (VirtualClick != null)
            {
                virtualClick = VirtualClick.Get(context);
            }
            var _button = (Input.MouseButton)button;

            el.Click(virtualClick, _button, OffsetX, OffsetY, doubleclick);
        }
Пример #3
0
        protected override void Execute(CodeActivityContext context)
        {
            var el = Element.Get(context);

            if (el == null)
            {
                throw new ArgumentException("element cannot be null");
            }
            var doubleclick = false;

            if (DoubleClick != null)
            {
                doubleclick = DoubleClick.Get(context);
            }
            var button       = Button.Get(context);
            var virtualClick = false;

            if (VirtualClick != null)
            {
                virtualClick = VirtualClick.Get(context);
            }
            var animatemouse = false;

            if (AnimateMouse != null)
            {
                animatemouse = AnimateMouse.Get(context);
            }
            var keymodifiers = "";

            if (KeyModifiers != null)
            {
                keymodifiers = KeyModifiers.Get(context);
            }

            var disposes = new List <IDisposable>();
            var keys     = TypeText.GetKeys(keymodifiers);

            foreach (var vk in keys)
            {
                disposes.Add(FlaUI.Core.Input.Keyboard.Pressing(vk));
            }

            var _button = (Input.MouseButton)button;

            el.Click(virtualClick, _button, OffsetX, OffsetY, doubleclick, animatemouse);

            disposes.ForEach(x => { x.Dispose(); });

            TimeSpan postwait = TimeSpan.Zero;

            if (PostWait != null)
            {
                postwait = PostWait.Get(context);
            }
            if (postwait != TimeSpan.Zero)
            {
                System.Threading.Thread.Sleep(postwait);
            }
        }
Пример #4
0
        protected override void Execute(CodeActivityContext context)
        {
            var el = Element.Get(context);

            if (el == null)
            {
                throw new ArgumentException("element cannot be null");
            }
            var doubleclick = false;

            if (DoubleClick != null)
            {
                doubleclick = DoubleClick.Get(context);
            }
            var button       = Button.Get(context);
            var virtualClick = false;

            if (VirtualClick != null)
            {
                virtualClick = VirtualClick.Get(context);
            }
            var animatemouse = false;

            if (AnimateMouse != null)
            {
                animatemouse = AnimateMouse.Get(context);
            }

            var _button = (Input.MouseButton)button;

            el.Click(virtualClick, _button, OffsetX, OffsetY, doubleclick, animatemouse);
            TimeSpan postwait = TimeSpan.Zero;

            if (PostWait != null)
            {
                postwait = PostWait.Get(context);
            }
            if (postwait != TimeSpan.Zero)
            {
                System.Threading.Thread.Sleep(postwait);
            }
        }