Ejemplo n.º 1
0
        public bool GetCellInfo(Bitmap data, out CellStatus status, out int n)
        {
            status = CellStatus.Undef;
            n = -3;
            BitmapWrapper bw = new BitmapWrapper(data);

            Color t = bw.AvgColor;
            double d = bw.Factor;
            Console.WriteLine(t);
            Console.WriteLine(d);
            Console.WriteLine("Byway");
            //data.Save("d:\\gc.png");

            foreach (var item in IdentifyData.IdentifierList)
                if (item.Deal(bw, out status, out n)) return true;

            status = CellStatus.Undef;
            n = -3;

            return false;;
        }
Ejemplo n.º 2
0
 public override bool Deal(BitmapWrapper bw)
 {
     if (_color.Near(bw.AvgColor, 30)) {
         return (_factor <= 0) ||bw.Factor<_factor;
     }
     return false;
 }
Ejemplo n.º 3
0
 public abstract bool Deal(BitmapWrapper bw);
Ejemplo n.º 4
0
 public bool Deal(BitmapWrapper bw, out CellStatus status, out int n)
 {
     status=Status;
     n=N;
     return Deal(bw);
 }
Ejemplo n.º 5
0
 public override bool Deal(BitmapWrapper bw)
 {
     return bw.List.Any(_ipoint.IsNear);
 }
Ejemplo n.º 6
0
 public bool Deal(BitmapWrapper bw, out CellStatus status, out int n)
 {
     status = CellStatus.Mine;
     n = -3;
     var bm = bw.img;
     var w = bm.Width/2;
     var h = bm.Height/2;
     for(var i=0;i<h;i++)
         for (var j = 0; j < w; j++) {
             if (bm.GetPixel(j, i).R>250) return true;
         }
     return false;
 }
Ejemplo n.º 7
0
 public override bool Deal(BitmapWrapper bw)
 {
     return true;
 }