public override bool Play(ESRPlayer player)
        {
            //Waiting
            player.WaitingPlaying(this);
            //Action
            GM.Instance.InputSimulator.Mouse.VerticalScroll(this.MouseData);
            foreach (var item in this.ChildItems)
            {
                MouseWheelRecorderItem mouseItem = item as MouseWheelRecorderItem;
                if (mouseItem == null)
                {
                    continue;
                }

                if (!player.IsThreadEnable)
                {
                    return(false);
                }

                //Waiting
                player.WaitingPlaying(item);
                //Action
                GM.Instance.InputSimulator.Mouse.VerticalScroll(mouseItem.MouseData);
            }
            return(true);
        }
 public override bool Play(ESRPlayer player)
 {
     //Waiting
     player.WaitingPlaying(this);
     //Action
     return(true);
 }
        public override bool Play(ESRPlayer player)
        {
            //Waiting
            player.WaitingPlaying(this);
            foreach (var item in this.ChildItems)
            {
                if (!player.IsThreadEnable)
                {
                    return(false);
                }

                //Waiting
                player.WaitingPlaying(item);
            }
            return(true);
        }
        public override bool Play(ESRPlayer player)
        {
            //Waiting
            player.WaitingPlaying(this);

            //Action
            Point pt = AUtil.ToMouseSimulatorPoint(this.Point);

            GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y);
            if (this.Button == ButtonType.Left)
            {
                GM.Instance.InputSimulator.Mouse.LeftButtonClick();
            }
            else
            {
                GM.Instance.InputSimulator.Mouse.RightButtonClick();
            }

            foreach (var item in this.ChildItems)
            {
                MouseClickRecorderItem mouseItem = item as MouseClickRecorderItem;
                if (mouseItem == null)
                {
                    continue;
                }

                if (!player.IsThreadEnable)
                {
                    return(false);
                }

                //Waiting
                player.WaitingPlaying(item);
                //Action
                if (this.Button == ButtonType.Left)
                {
                    GM.Instance.InputSimulator.Mouse.LeftButtonClick();
                }
                else
                {
                    GM.Instance.InputSimulator.Mouse.RightButtonClick();
                }
            }

            return(true);
        }
        public override bool Play(ESRPlayer player)
        {
            //Waiting
            player.WaitingPlaying(this);

            //Action
            ActionVkCode(this);
            foreach (var i in this.ChildItems)
            {
                if (!player.IsThreadEnable)
                {
                    return(false);
                }

                KeyPressRecorderItem item = i as KeyPressRecorderItem;
                //Waiting
                player.WaitingPlaying(item);
                //Action
                ActionVkCode(item);
            }
            return(true);
        }
        public override bool Play(ESRPlayer player)
        {
            //Waiting
            player.WaitingPlaying(this);
            //Action
            Point pt = AUtil.ToMouseSimulatorPoint(this.Point);

            GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y);
            foreach (var item in this.ChildItems)
            {
                if (!player.IsThreadEnable)
                {
                    return(false);
                }

                //Waiting
                player.WaitingPlaying(item);
                //Action
                pt = AUtil.ToMouseSimulatorPoint(item.Point);
                GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y);
            }
            return(true);
        }
Esempio n. 7
0
        public override bool Play(ESRPlayer player)
        {
            //Waiting
            player.WaitingPlaying(this);

            //Action
            if (this.Dir == Dir.Up)
            {
                GM.Instance.InputSimulator.Keyboard.KeyUp((VirtualKeyCode)this.VkCode);
            }
            else if (this.Dir == Dir.Down)
            {
                GM.Instance.InputSimulator.Keyboard.KeyDown((VirtualKeyCode)this.VkCode);
            }
            return(true);
        }
        public override bool Play(ESRPlayer player)
        {
            //Waiting
            player.WaitingPlaying(this);

            //Action
            Point pt = AUtil.ToMouseSimulatorPoint(this.Point);

            GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y);

            if (this.Dir == Dir.Down)
            {
                if (this.Button == ButtonType.Left)
                {
                    GM.Instance.InputSimulator.Mouse.LeftButtonDown();
                }
                else if (this.Button == ButtonType.Right)
                {
                    GM.Instance.InputSimulator.Mouse.RightButtonDown();
                }
                else if (this.Button == ButtonType.Wheel)
                {
                    GM.Instance.InputSimulator.Mouse.MiddleButtonDown();
                }
            }
            else
            {
                if (this.Button == ButtonType.Left)
                {
                    GM.Instance.InputSimulator.Mouse.LeftButtonUp();
                }
                else if (this.Button == ButtonType.Right)
                {
                    GM.Instance.InputSimulator.Mouse.RightButtonUp();
                }
                else if (this.Button == ButtonType.Wheel)
                {
                    GM.Instance.InputSimulator.Mouse.MiddleButtonUp();
                }
            }
            return(true);
        }