Пример #1
0
        private void axPageLayoutControl1_OnDoubleClick(object sender, ESRI.ArcGIS.Controls.IPageLayoutControlEvents_OnDoubleClickEvent e)
        {
            if (e.button == 1)
            {
                //标注的修改
                if (axPageLayoutControl1.CurrentTool == null)
                {
                    return;
                }
                if (((axPageLayoutControl1.CurrentTool) as ICommand).Name == "ControlToolsGraphicElement_SelectTool")
                {
                    IPoint pPoint = new PointClass();
                    pPoint.PutCoords(e.pageX, e.pageY);


                    IGraphicsContainer pGraphicsContainer = axPageLayoutControl1.PageLayout as IGraphicsContainer;

                    IEnumElement pEnumElement = pGraphicsContainer.LocateElements(pPoint, 10);
                    if (pEnumElement != null)
                    {
                        IElement pElement = pEnumElement.Next();
                        if (pElement is ITextElement)
                        {
                            ITextElement       ptextElement = pElement as ITextElement;
                            MapPrint.TextSetUp textSetUp    = new MapPrint.TextSetUp();
                            textSetUp.UpdateTextElement(ptextElement);
                            textSetUp.Show();
                        }
                    }
                }
            }
        }
Пример #2
0
        private void axPageLayoutControl1_OnDoubleClick(object sender, ESRI.ArcGIS.Controls.IPageLayoutControlEvents_OnDoubleClickEvent e)
        {
            if (e.button == 1)
            {
                //标注的修改
                if (axPageLayoutControl1.CurrentTool == null) return;
                if (((axPageLayoutControl1.CurrentTool) as ICommand).Name == "ControlToolsGraphicElement_SelectTool")
                {
                    IPoint pPoint = new PointClass();
                    pPoint.PutCoords(e.pageX, e.pageY);

                    IGraphicsContainer pGraphicsContainer = axPageLayoutControl1.PageLayout as IGraphicsContainer;

                    IEnumElement pEnumElement = pGraphicsContainer.LocateElements(pPoint, 10);
                    if (pEnumElement != null)
                    {
                        IElement pElement = pEnumElement.Next();
                        if (pElement is ITextElement)
                        {
                            ITextElement ptextElement = pElement as ITextElement;
                            MapPrint.TextSetUp textSetUp = new MapPrint.TextSetUp();
                            textSetUp.UpdateTextElement(ptextElement);
                            textSetUp.Show();
                        }
                    }

                }
            }
        }