Exemplo n.º 1
0
        public void Execute(IScreenParser parser)
        {
            POINT targetPoint = new POINT(parser.GetXCoord(Target.X) + 25, parser.GetYCoord(Target.Y) + 25);

            User32Api.SetCursorPos(targetPoint.X, targetPoint.Y);

            switch (Move)
            {
            case MoveTypes.DoubleClick:
                User32Api.MouseDoubleClick(targetPoint);
                break;

            case MoveTypes.SetFlag:
                if (Target.State == BlockState.Flag)
                {
                    return;
                }
                else if (Target.UserGuess)
                {
                    User32Api.MouseRightClick(targetPoint);
                }
                User32Api.MouseRightClick(targetPoint);
                break;

            case MoveTypes.SetClear:
                User32Api.MouseClick(targetPoint);
                break;
            }
        }