Beispiel #1
0
 private void axPageLayoutControl_OnKeyDown(object sender, IPageLayoutControlEvents_OnKeyDownEvent e)
 {
     if (_App.CurrentTool != null)
     {
         _Tool = _ToolCol[_App.CurrentTool];
         _Tool.OnKeyDown(e.keyCode, e.shift);
     }
 }
Beispiel #2
0
 private void axPageLayoutControl_OnKeyDown(object sender, IPageLayoutControlEvents_OnKeyDownEvent e)
 {
     try
     {
         if (_App.CurrentTool != null)
         {
             _Tool = _ToolCol[_App.CurrentTool];
             _Tool.OnKeyDown(e.keyCode, e.shift);
         }
     }
     catch (System.Exception ex)
     {
         return;
     }
 }
Beispiel #3
0
 private void axPageLayoutControl_OnKeyDown(object sender, IPageLayoutControlEvents_OnKeyDownEvent e)
 {
     try
     {
         if (_App.CurrentTool != null)
         {
             _Tool = _ToolCol[_App.CurrentTool];
             _Tool.OnKeyDown(e.keyCode, e.shift);
         }
     }
     catch (System.Exception ex)
     {
         return;
     }
 }
Beispiel #4
0
 private void axPageLayoutControl_OnKeyDown(object sender, IPageLayoutControlEvents_OnKeyDownEvent e)
 {
     if (_App.CurrentTool != null)
     {
         _Tool = _ToolCol[_App.CurrentTool];
         _Tool.OnKeyDown(e.keyCode, e.shift);
     }
 }
Beispiel #5
0
        private void axPageLayoutControl1_OnKeyDown(object sender, IPageLayoutControlEvents_OnKeyDownEvent e)
        {
            #region
            if (m_element != null)
            {
                if (e.keyCode == 46)//删除选中元素,按delete键 时执行删除元素
                {
                    if (m_element is IMapFrame)
                    {

                        m_pageLayoutControl.GraphicsContainer.DeleteAllElements();//当选中的元素是Data Frame 时,删除所有的元素(包括图例,比例尺等),同时删除所有图层;
                        m_pageLayoutControl.ActiveView.Refresh();
                        m_pageLayoutControl.MousePointer = esriControlsMousePointer.esriPointerDefault;
                    }
                    else
                    {
                        m_pageLayoutControl.GraphicsContainer.DeleteElement(m_element);//删除选择元素
                        m_element = null;
                        m_designPageLayout.m_elementToMove = null;
                        m_pageLayoutControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);//刷新
                        m_pageLayoutControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null);
                        m_pageLayoutControl.ActiveView.Refresh();
                        m_pageLayoutControl.MousePointer = esriControlsMousePointer.esriPointerDefault;//默认鼠标样式
                    }
                }
            }
            #endregion
        }