Esempio n. 1
0
 private void axPageLayoutControl_OnMouseDown(object sender, IPageLayoutControlEvents_OnMouseDownEvent e)
 {
     if (_App.CurrentTool != null)
     {
         _Tool = _ToolCol[_App.CurrentTool];
         //左键
         if (e.button == 1)
         {
             _Tool.OnMouseDown(e.button, e.shift, (int)e.pageX, (int)e.pageY);
         }
         else if (e.button == 2)//右键
         {
             _Tool.OnContextMenu(e.x, e.y);
         }
     }
 }
Esempio n. 2
0
 private void axMapControl_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
 {
     if (_App.CurrentTool != null)
     {
         _Tool = _ToolCol[_App.CurrentTool];
         //左键
         if (e.button == 1)
         {
             _Tool.OnMouseDown(e.button, e.shift, (int)e.mapX, (int)e.mapY);
         }
         else if (e.button == 2)//右键
         {
             _Tool.OnContextMenu(e.x, e.y);
         }
     }
     toolStripStatusLabel2.Text = " 当前坐标X:" + e.mapX.ToString() + "  Y:" + e.mapY.ToString();
 }