예제 #1
0
        public string FindMultiColorEx(int x1, int y1, int x2, int y2, string first_color, string offset_color, double sim, int dir)
        {
            switch (WindowsFormsApplication1.BaseData.SystemInfo.BindWindowsType)
            {
            case 1:    //1是大漠2是AE
            {
                return(dm.FindMultiColorEx(x1, y1, x2, y2, first_color, offset_color, sim, dir));
            }

            case 2:
            {
                return(dm.FindMultiColorEx(x1, y1, x2, y2, first_color, offset_color, sim, dir));
            }

            default:
                return("false");
            }
        }
예제 #2
0
        private Point FindBaitPosition(string color, double fishRodSimulity, List <int> bounds)
        {
            var offsetColor = "1|0|" + color;

            for (int i = 2; i <= 6; i++)
            {
                offsetColor += offsetColor + "," + i + "|0|" + color;
            }
            var    colorPos = _dmSoft.FindMultiColorEx(bounds[0], bounds[1], bounds[2], bounds[3], color, offsetColor, fishRodSimulity, 0);
            object x, y;

            _dmSoft.GetResultPos(colorPos, 0, out x, out y);
            return(new Point(int.Parse(x.ToString()), int.Parse(y.ToString())));
        }