public override void OnMouseDown(int x, int y, System.Windows.Forms.MouseEventArgs e) { RgPoint P1 = mScreenDisplay.DisplayTransformation.ToUnit(new System.Drawing.PointF(x, y)); Carto.FetureLayer featurelyr = mMapCtrl.Map.CurrentLayer as Carto.FetureLayer; if (featurelyr != null && featurelyr.ShapeType == RgEnumShapeType.RgPoint) { featurelyr.AddFeature(P1); } mMapCtrl.Refresh(); }
public override void OnMouseDown(int x, int y, System.Windows.Forms.MouseEventArgs e) { RgPoint P1 = mScreenDisplay.DisplayTransformation.ToUnit(new System.Drawing.PointF(x, y)); Graphics g = Graphics.FromHwnd(mMapCtrl.Handle); mScreenDisplay.StartDrawing(g, 1); IScreenDisplayDraw mScreenDisplayDraw = mScreenDisplay as IScreenDisplayDraw; mScreenDisplayDraw.DrawPoint(P1, new System.Drawing.Pen(System.Drawing.Color.Yellow), new System.Drawing.SolidBrush(System.Drawing.Color.Yellow)); mScreenDisplay.FinishDrawing(); g.Dispose(); if (PickUpFinishedEventHandler != null) { PickUpFinishedEventHandler(P1); } //mMapCtrl.Refresh(); mPickedPoint = P1; }