私人无效axMapControl1_OnMouseDown (对象发件人, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent英文)
(
/ /如果左手鼠标按钮
如果( e.button == 1 )
(
/ /创建一个点,抓的IPoint接口
IPoint点=新PointClass ( ) ;
/ /设置点属性
point.X = e.mapX ;
point.Y = e.mapY ;
/ /如果这是第一点的一个新行
如果( m_Polyline ==空)
(
/ /创建形式的私人折线成员国和掌握的IPolyline接口
m_Polyline =新PolylineClass ( ) ;
)
/ /漆的IPointsCollection界面使用界面IPolyline
对象? = Type.Missing ;
/ /对象01 = m_PointCollection.PointCount - 1 ;
m_PointCollection = ( IPointCollection ) m_Polyline ;
m_PointCollection.AddPoint (点,参考邻,裁判o )项;
/ /刷新前台从而消除任何文字注释
axMapControl1.Refresh ( esriViewDrawPhase.esriViewForeground , Type.Missing , Type.Missing ) ;
)
其他
(
/ /如果权利或鼠标中键放大到用户定义的矩形
/ /创建一个信封和掌握的IEnvelope接口
IEnvelope信封= axMapControl1.TrackRectangle ( ) ;
/ /如果用户拖出一个矩形
如果(信封! =无效)
(
/ /设置地图的控制范围内的财产
axMapControl1.Extent =信封;
)
)
)