Exemple #1
0
 private void 面积量测ToolStripMenuItem_Click(object sender, EventArgs e)//初始化相关变量,弹出量测窗体
 {
     axMapControl1.CurrentTool  = null;
     mousedownname              = "MeasureArea";
     axMapControl1.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
     if (frmMeasureresult == null || frmMeasureresult.IsDisposed)
     {
         frmMeasureresult            = new measureresult();
         frmMeasureresult.frmClosed += frmMeasureResult_frmClosed;
         frmMeasureresult.Show();
     }
     else
     {
         frmMeasureresult.Activate();
     }
 }
Exemple #2
0
 private void 距离量测ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     axMapControl1.CurrentTool  = null;
     mousedownname              = "MeasureLength";                               //给后续鼠标参数传递参数
     axMapControl1.MousePointer = esriControlsMousePointer.esriPointerCrosshair; //改变鼠标形状
     if (frmMeasureresult == null || frmMeasureresult.IsDisposed)                //窗口不存在则新建一个窗口
     {
         frmMeasureresult            = new measureresult();
         frmMeasureresult.frmClosed += frmMeasureResult_frmClosed;//委托事件就是后面的函数
         frmMeasureresult.Show();
     }
     else
     {
         frmMeasureresult.Activate();//激活存在的窗口
     }
 }