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 void Add(MouseEventArgs e)
        {
            IRecorderItem newRecorder = null;

            if (e.Message == MouseMessages.WM_MOUSEWHEEL)
            {
                newRecorder = new MouseWheelRecorderItem()
                {
                    Dir       = ((int)e.MouseData) > 0 ? Dir.Up : Dir.Down,
                    Point     = new System.Windows.Point(e.Point.x, e.Point.y),
                    MouseData = (int)e.MouseData,
                };

                if (IsCurrentMouseWheelDir(newRecorder))
                {
                    this.WaitingRecorder.ResetWaitingTime();
                    this.CurrentRecorder.ChildItems.Add(newRecorder);
                    this.ESRRecorder.UpdateItem(this.CurrentRecorder);
                    return;
                }
            }
            else if (e.Message == MouseMessages.WM_LBUTTONDOWN ||
                     e.Message == MouseMessages.WM_RBUTTONDOWN ||
                     e.Message == MouseMessages.WM_WHEELBUTTONDOWN)
            {
                if (IsLastMouseDown())
                {
                    return;
                }

                if (IsMouseButtonPress())
                {
                    newRecorder = new MouseClickRecorderItem()
                    {
                        Button    = ToButtonType(e.Message),
                        Point     = new System.Windows.Point(e.Point.x, e.Point.y),
                        MouseData = (int)e.MouseData,
                    };

                    this.ESRRecorder.ResetWaitingTime();
                    this.CurrentMouseRecorder.ChildItems.Add(newRecorder);
                    this.ESRRecorder.UpdateItem(this.CurrentMouseRecorder);
                    return;
                }

                newRecorder = new MouseUpDownRecorderItem()
                {
                    Dir       = Dir.Down,
                    Button    = ToButtonType(e.Message),
                    Point     = new System.Windows.Point(e.Point.x, e.Point.y),
                    MouseData = (int)e.MouseData,
                };
            }
            else if (e.Message == MouseMessages.WM_LBUTTONUP ||
                     e.Message == MouseMessages.WM_RBUTTONUP ||
                     e.Message == MouseMessages.WM_WHEELBUTTONUP)
            {
                if (IsMouseButtonPress())
                {
                    ALog.Debug("MouseEvent.Up, IsMouseButtonPress: True");
                    if (IsCurrentMouseClick())
                    {
                        return;
                    }

                    //Remove MouseDown item
                    this.ESRRecorder.DeleteItem(this.CurrentMouseRecorder);
                    this.ESRRecorder.ResetCurrentRecorderbyLast();

                    newRecorder = new MouseClickRecorderItem()
                    {
                        Button    = ToButtonType(e.Message),
                        Point     = new System.Windows.Point(e.Point.x, e.Point.y),
                        MouseData = (int)e.MouseData,
                    };
                }
                else
                {
                    newRecorder = new MouseUpDownRecorderItem()
                    {
                        Dir       = Dir.Up,
                        Button    = ToButtonType(e.Message),
                        Point     = new System.Windows.Point(e.Point.x, e.Point.y),
                        MouseData = (int)e.MouseData,
                    };
                }
            }
            else if (e.Message == MouseMessages.WM_MOUSEMOVE)
            {
                newRecorder = new MouseMoveRecorderItem()
                {
                    Point     = new System.Windows.Point(e.Point.x, e.Point.y),
                    MouseData = (int)e.MouseData,
                };

                if (IsIgnoreMouseMove(newRecorder))
                {
                    ALog.Debug("ESRMouseRecorder::Add(MouseEvent)::IsIgnoreMouseMove");
                    return;
                }

                if (IsCurrentMouseMove())
                {
                    this.WaitingRecorder.ResetWaitingTime();
                    this.CurrentMouseRecorder.ChildItems.Add(newRecorder);
                    this.ESRRecorder.UpdateItem(this.CurrentMouseRecorder);
                    return;
                }
            }

            //Need to delete Unnecessary a mouse move item
            if (IsCurrentSingleMouseMove(newRecorder))
            {
                this.ESRRecorder.DeleteItem(this.CurrentRecorder);
            }

            this.ESRRecorder.AddMouseItem(newRecorder);
        }