public override void OnMouseDown(int Button, int Shift, int X, int Y)
{
IActiveView pActView = m_hookHelper.ActiveView;
IScreenDisplay pScreen = pActView.ScreenDisplay;
IRubberBand pRubber = new RubberPolygonClass();
IPolygon pPolygon = pRubber.TrackNew(pScreen, null) as IPolygon ;
IArea pArea = pPolygon as IArea;
double dArea = pArea.Area;
MessageBox.Show("面积为:" + dArea);
}
{
IActiveView pActView = m_hookHelper.ActiveView;
IScreenDisplay pScreen = pActView.ScreenDisplay;
IRubberBand pRubber = new RubberPolygonClass();
IPolygon pPolygon = pRubber.TrackNew(pScreen, null) as IPolygon ;
IArea pArea = pPolygon as IArea;
double dArea = pArea.Area;
MessageBox.Show("面积为:" + dArea);
}