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;; }
public override bool Deal(BitmapWrapper bw) { if (_color.Near(bw.AvgColor, 30)) { return (_factor <= 0) ||bw.Factor<_factor; } return false; }
public abstract bool Deal(BitmapWrapper bw);
public bool Deal(BitmapWrapper bw, out CellStatus status, out int n) { status=Status; n=N; return Deal(bw); }
public override bool Deal(BitmapWrapper bw) { return bw.List.Any(_ipoint.IsNear); }
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; }
public override bool Deal(BitmapWrapper bw) { return true; }