Beispiel #1
0
        /// <summary>
        /// 查找指定区域内的所有颜色块,颜色格式"RRGGBB-DRDGDB",注意,和按键的颜色格式相反
        /// </summary>
        /// <param name="dmsoft"></param>
        /// <param name="findColor"></param>
        /// <returns>查找指定区域内的所有颜色块,颜色格式"RRGGBB-DRDGDB",注意,和按键的颜色格式相反</returns>
        public static List <Point> FindColorBlockEx(this dmsoft dmsoft, FindColorBlock findColor)
        {
            int          x, y;
            List <Point> points = new List <Point>();
            string       s      = dmsoft.FindColorBlockEx(findColor.X1, findColor.Y1, findColor.X2, findColor.Y2, findColor.Color, findColor.Sim, findColor.Count, findColor.Width, findColor.Height);

            var index = 0;
            var count = dmsoft.GetResultCount(s);

            while (index < count)
            {
                dmsoft.GetResultPos(s, index++, out x, out y);
                points.Add(new Point(x, y));
            }
            return(points);
        }
Beispiel #2
0
 public int GetResultCount(string str)
 {
     return(dm.GetResultCount(str));
 }