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);
            }
        }
Beispiel #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 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);
            }
        }