public void OnMouseDown(int Button, int Shift, int X, int Y) { IPoint point = m_focusMap.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y) as IPoint; if (m_polygonFeedback == null) { m_polygonFeedback = new ESRI.ArcGIS.Display.NewPolygonFeedback(); m_polygonFeedback.Display = m_focusMap.ScreenDisplay; m_polygonFeedback.Start(point); } m_polygonFeedback.AddPoint(point); m_polygonFeedback.MoveTo(point); }
public IPolygon OnDoubleClick(int Button, int Shift, int X, int Y) { //首先会先触发Down,然后执行下面的程序: m_focusMap.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null); IPolygon polygon = null; if (m_polygonFeedback != null) { polygon = m_polygonFeedback.Stop(); } m_focusMap.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null); m_polygonFeedback = null; return(polygon); }