public void paint( Point point,string groundtype, int nplants) { if (this.InvokeRequired) { PaintCallback d = new PaintCallback(paint); this.Invoke(d, new object[] { point, groundtype, nplants }); } else { lock (locker) { mapimage= _gmap.paint(mapimage, point, groundtype, nplants); this.Refresh(); } } }
private new void Paint(RECT rect) { if (this.InvokeRequired) { PaintCallback d = new PaintCallback(Paint); this.Invoke(d, new object[] { rect }); } else { this.Location = new Point(rect.left, rect.top); this.Size = new Size(rect.right - rect.left, rect.bottom - rect.top); } }