帮忙翻译一下,谢谢~
哪位高手帮我把下面的注释都翻译一下,谢谢了~privatevoidaxMapControl1_OnMouseDown(objectsender,ESRI.ArcGIS.C...
哪位高手帮我把下面的注释都翻译一下,谢谢了~
private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
{
//If left hand mouse button
if (e.button == 1)
{
//Create a point and grab hold of the IPoint inteface
IPoint point = new PointClass();
//Set point properties
point.X = e.mapX;
point.Y = e.mapY;
//If this is the first point of a new line
if (m_Polyline == null)
{
//Create the forms private polyline member and grab hold of the IPolyline interface
m_Polyline = new PolylineClass();
}
//QI for the IPointsCollection interface using the IPolyline interface
object o = Type.Missing;
//object o1 = m_PointCollection.PointCount-1;
m_PointCollection = (IPointCollection) m_Polyline;
m_PointCollection.AddPoint(point, ref o, ref o);
//Refresh the foreground thereby removing any text annotation
axMapControl1.Refresh(esriViewDrawPhase.esriViewForeground, Type.Missing,Type.Missing);
}
else
{
//If right or middle mouse button zoom to user defined rectangle
//Create an envelope and grab hold of the IEnvelope interface
IEnvelope envelope = axMapControl1.TrackRectangle();
//If user dragged a rectangle
if (envelope != null)
{
//Set map controls extent property
axMapControl1.Extent = envelope;
}
}
}
希望大家可以认真帮小弟一下,不要用网上的在线翻译。
在线翻译我也知道,谢谢~ 展开
private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
{
//If left hand mouse button
if (e.button == 1)
{
//Create a point and grab hold of the IPoint inteface
IPoint point = new PointClass();
//Set point properties
point.X = e.mapX;
point.Y = e.mapY;
//If this is the first point of a new line
if (m_Polyline == null)
{
//Create the forms private polyline member and grab hold of the IPolyline interface
m_Polyline = new PolylineClass();
}
//QI for the IPointsCollection interface using the IPolyline interface
object o = Type.Missing;
//object o1 = m_PointCollection.PointCount-1;
m_PointCollection = (IPointCollection) m_Polyline;
m_PointCollection.AddPoint(point, ref o, ref o);
//Refresh the foreground thereby removing any text annotation
axMapControl1.Refresh(esriViewDrawPhase.esriViewForeground, Type.Missing,Type.Missing);
}
else
{
//If right or middle mouse button zoom to user defined rectangle
//Create an envelope and grab hold of the IEnvelope interface
IEnvelope envelope = axMapControl1.TrackRectangle();
//If user dragged a rectangle
if (envelope != null)
{
//Set map controls extent property
axMapControl1.Extent = envelope;
}
}
}
希望大家可以认真帮小弟一下,不要用网上的在线翻译。
在线翻译我也知道,谢谢~ 展开
展开全部
私人无效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 =信封;
)
)
)
(
/ /如果左手鼠标按钮
如果( 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 =信封;
)
)
)
展开全部
private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
{
//If left hand mouse button 如果点击鼠标左键
if (e.button == 1)
{
//Create a point and grab hold of the IPoint inteface 实例化一个点,并将实例化的点转化成IPoint 接口
IPoint point = new PointClass();
//Set point properties 设置点的属性
point.X = e.mapX;
point.Y = e.mapY;
//If this is the first point of a new line 如果这个点是新线的起始点
if (m_Polyline == null)
{
//Create the forms private polyline member and grab hold of the IPolyline interface 创新一个Polyline对象,并将Polyline对象转化成IPolyline接口(m_Polyline)。
m_Polyline = new PolylineClass();
}
//QI for the IPointsCollection interface using the IPolyline interface 将IPolyline接口强制转化成一个IPointsCollection接口进行操作。
object o = Type.Missing;
//object o1 = m_PointCollection.PointCount-1;
m_PointCollection = (IPointCollection) m_Polyline;
m_PointCollection.AddPoint(point, ref o, ref o);
//Refresh the foreground thereby removing any text annotation 刷新地图的显示,以屏蔽文本注释。
axMapControl1.Refresh(esriViewDrawPhase.esriViewForeground, Type.Missing,Type.Missing);
}
else
{
//If right or middle mouse button zoom to user defined rectangle 如果点击了鼠标右键或中键,则去自定义矩形
//Create an envelope and grab hold of the IEnvelope interface 将axMapControl1.TrackRectangle转化成 IEnvelope接口
IEnvelope envelope = axMapControl1.TrackRectangle();
//If user dragged a rectangle 如果用户拖动了一个矩形。
if (envelope != null)
{
//Set map controls extent property 设置地图控件 Extent(范围)属性。
axMapControl1.Extent = envelope;
}
}
}
{
//If left hand mouse button 如果点击鼠标左键
if (e.button == 1)
{
//Create a point and grab hold of the IPoint inteface 实例化一个点,并将实例化的点转化成IPoint 接口
IPoint point = new PointClass();
//Set point properties 设置点的属性
point.X = e.mapX;
point.Y = e.mapY;
//If this is the first point of a new line 如果这个点是新线的起始点
if (m_Polyline == null)
{
//Create the forms private polyline member and grab hold of the IPolyline interface 创新一个Polyline对象,并将Polyline对象转化成IPolyline接口(m_Polyline)。
m_Polyline = new PolylineClass();
}
//QI for the IPointsCollection interface using the IPolyline interface 将IPolyline接口强制转化成一个IPointsCollection接口进行操作。
object o = Type.Missing;
//object o1 = m_PointCollection.PointCount-1;
m_PointCollection = (IPointCollection) m_Polyline;
m_PointCollection.AddPoint(point, ref o, ref o);
//Refresh the foreground thereby removing any text annotation 刷新地图的显示,以屏蔽文本注释。
axMapControl1.Refresh(esriViewDrawPhase.esriViewForeground, Type.Missing,Type.Missing);
}
else
{
//If right or middle mouse button zoom to user defined rectangle 如果点击了鼠标右键或中键,则去自定义矩形
//Create an envelope and grab hold of the IEnvelope interface 将axMapControl1.TrackRectangle转化成 IEnvelope接口
IEnvelope envelope = axMapControl1.TrackRectangle();
//If user dragged a rectangle 如果用户拖动了一个矩形。
if (envelope != null)
{
//Set map controls extent property 设置地图控件 Extent(范围)属性。
axMapControl1.Extent = envelope;
}
}
}
参考资料: http://www.exam123.com
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在网上用baidu搜索下载一款翻译软件(如‘有道桌面词典’‘格灵斯’等)就可以解决很多问题。很实用!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询