Ejemplo 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;
            }
        }
Ejemplo n.º 2
0
        public Board(IScreenParser parser, int width = 30, int height = 16)
        {
            this.parser = parser;
            algorithms.Add(new SimpleSolver());
            algorithms.Add(new MacroSolver());

            Grid = new Block[width, height];
        }
Ejemplo n.º 3
0
        public Board(IScreenParser parser, int width = 30, int height = 16)
        {
            this.parser = parser;
            algorithms.Add(new SimpleSolver());
            algorithms.Add(new MacroSolver());

            Grid = new Block[width, height];
        }
Ejemplo n.º 4
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;
            }
        }
Ejemplo n.º 5
0
 public void MoveMouseToBlock(IScreenParser parser)
 {
     POINT targetPoint = new POINT(parser.GetXCoord(Target.X) + 25, parser.GetYCoord(Target.Y) + 25);
     User32Api.SetCursorPos(targetPoint.X, targetPoint.Y);
 }
Ejemplo n.º 6
0
        public void MoveMouseToBlock(IScreenParser parser)
        {
            POINT targetPoint = new POINT(parser.GetXCoord(Target.X) + 25, parser.GetYCoord(Target.Y) + 25);

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