• 大小: 76KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-04
  • 语言: C#
  • 标签: 鹰眼  AE开发  C#  ArcEngine  

资源简介

ArcEngine开发之鹰眼功能C#实现,完整鹰眼功能简易实现。 关键代码也可直接看http://blog.csdn.net/sean4m/article/details/51348361里所示。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;

namespace EagleEyeDemo
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
            InitializeComponent();
        }

        private void ToolStripMenuItem_Open_Click(object sender EventArgs e)
        {
            OpenFileDialog openFileDlg = new OpenFileDialog();
            openFileDlg.title = “打开地图文件“;
            openFileDlg.Filter = “地图文件 (*.mxd)|*.mxd“;
            openFileDlg.RestoreDirectory = true;
            string fileName;
            if(DialogResult.OK == openFileDlg.ShowDialog())
            {
                fileName = openFileDlg.FileName;
                if(axMapControl1.CheckMxFile(fileName))
                {
                    axMapControl1.LoadMxFile(fileName);
                }
                axMapControl1.Refresh();
            }
        }

        private void ToolStripMenuItem_EagleEye_Click(object sender EventArgs e)
        {
            if(splitContainer2.Panel2Collapsed)
            {
                splitContainer2.Panel2Collapsed = false;
            }
            else
            {
                splitContainer2.Panel2Collapsed = true;
            }
        }

        private void MainForm_Load(object sender EventArgs e)
        {
            axTOCControl1.SetBuddyControl(axMapControl1);
        }

        private void axMapControl1_OnExtentUpdated(object sender ESRI.ArcGIS.Controls.IMapControlEvents2_OnExtentUpdatedEvent e)
        {
            IEnvelope pEnvelope = (IEnvelope)e.newEnvelope;
            IGraphicsContainer pGraphicsContainer = axMapControl2.Map as IGraphicsContainer;
            IActiveView pActiveView = pGraphicsContainer as IActiveView;
            pGraphicsContainer.DeleteAllElements();
            IRectangleElement pRectangleEle = new RectangleElementClass();
            IElement pElement = pRectangleEle as IElement;
            pElement.Geometry = pEnvelope;

            IRgbColor pColor = new RgbColorClass();
            pColor.Red = 255;
            pColor.Green = 0;
            pColor.Blue = 0;
            pColor.Transparency = 255; 

            ILineSymbol pOutline = new SimpleLineSymbolClass();
            pOutline.Width = 3;
            pOutline.Color = pColor;
            pColor = new RgbColorClass();
            pColor.Red = 255;
            pColor.Green = 0;
            pColor.Blue = 0;
            pColor.Transparency = 0;

            IFillSymbol pFillSymbol = new SimpleFillSymbolClass();
            pFillSymbol.Color = pColor;
            pFillSymbo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        187  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\App.config

     文件      20992  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\bin\Debug\EagleEyeDemo.exe

     文件        187  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\bin\Debug\EagleEyeDemo.exe.config

     文件      30208  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\bin\Debug\EagleEyeDemo.pdb

     文件      24224  2016-05-08 22:41  EagleEyeDemo\EagleEyeDemo\bin\Debug\EagleEyeDemo.vshost.exe

     文件        187  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\bin\Debug\EagleEyeDemo.vshost.exe.config

     文件       7381  2016-05-08 22:29  EagleEyeDemo\EagleEyeDemo\EagleEyeDemo.csproj

     文件       5181  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\MainForm.cs

     文件      11862  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\MainForm.Designer.cs

     文件      13706  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\MainForm.resx

     文件      52489  2016-05-08 22:25  EagleEyeDemo\EagleEyeDemo\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       8032  2016-05-08 22:20  EagleEyeDemo\EagleEyeDemo\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        819  2016-05-08 22:41  EagleEyeDemo\EagleEyeDemo\obj\Debug\EagleEyeDemo.csproj.FileListAbsolute.txt

     文件       1038  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\obj\Debug\EagleEyeDemo.csproj.GenerateResource.Cache

     文件     122428  2016-05-08 22:29  EagleEyeDemo\EagleEyeDemo\obj\Debug\EagleEyeDemo.csprojResolveAssemblyReference.cache

     文件      20992  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\obj\Debug\EagleEyeDemo.exe

     文件       5146  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\obj\Debug\EagleEyeDemo.MainForm.resources

     文件      30208  2016-05-08 22:30  EagleEyeDemo\EagleEyeDemo\obj\Debug\EagleEyeDemo.pdb

     文件        180  2016-05-08 22:29  EagleEyeDemo\EagleEyeDemo\obj\Debug\EagleEyeDemo.Properties.Resources.resources

     文件          0  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件        527  2016-05-08 22:03  EagleEyeDemo\EagleEyeDemo\Program.cs

     文件       1366  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\Properties\AssemblyInfo.cs

     文件       2876  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\Properties\Resources.Designer.cs

     文件       5612  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\Properties\Resources.resx

     文件       1099  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\Properties\Settings.Designer.cs

     文件        249  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo\Properties\Settings.settings

     文件       1005  2016-05-08 21:58  EagleEyeDemo\EagleEyeDemo.sln

    ..A..H.     31744  2016-05-08 22:41  EagleEyeDemo\EagleEyeDemo.v12.suo

............此处省略12个文件信息

评论

共有 条评论