• 大小: 45KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-01
  • 语言: C#
  • 标签: VS2010  ArcEngine  Mxd  

资源简介

C#+ArcEngine10.1:打开mxd地图文档(VS2010窗体+代码)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Carto;

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

        private void 打开MxdToolStripMenuItem_Click(object sender EventArgs e)
        {
            IMapDocument xjMxdMapDocument = new MapDocumentClass();
            OpenFileDialog xjMxdOpenFileDialog = new OpenFileDialog();
            xjMxdOpenFileDialog.Filter = “地图文档(*.mxd)|*.mxd“;

            if (xjMxdOpenFileDialog.ShowDialog() == DialogResult.OK)
            {
                string xjmxdFilePath = xjMxdOpenFileDialog.FileName;
                if (axMapControl1.CheckMxFile(xjmxdFilePath))
                {
                    axMapControl1.Map.Clearlayers();
                    axMapControl1.LoadMxFile(xjmxdFilePath);
                }
            }
            axMapControl1.ActiveView.Refresh();
        }
    }
}

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

     文件      14336  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\bin\Debug\OpenMxd.exe

     文件      22016  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\bin\Debug\OpenMxd.pdb

     文件      11600  2018-08-13 22:13  OpenMxdVS2010\OpenMxd\bin\Debug\OpenMxd.vshost.exe

     文件        490  2015-07-10 19:01  OpenMxdVS2010\OpenMxd\bin\Debug\OpenMxd.vshost.exe.manifest

     文件       1227  2018-08-13 22:13  OpenMxdVS2010\OpenMxd\Form1.cs

     文件       7158  2018-08-13 22:13  OpenMxdVS2010\OpenMxd\Form1.Designer.cs

     文件      10866  2018-08-13 22:13  OpenMxdVS2010\OpenMxd\Form1.resx

     文件       2867  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7171  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        743  2018-08-13 22:13  OpenMxdVS2010\OpenMxd\obj\x86\Debug\OpenMxd.csproj.FileListAbsolute.txt

     文件        975  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\obj\x86\Debug\OpenMxd.csproj.GenerateResource.Cache

     文件      14336  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\obj\x86\Debug\OpenMxd.exe

     文件       3323  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\obj\x86\Debug\OpenMxd.Form1.resources

     文件      22016  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\obj\x86\Debug\OpenMxd.pdb

     文件        180  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\obj\x86\Debug\OpenMxd.Properties.Resources.resources

     文件       5771  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\OpenMxd.csproj

     文件        488  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\Program.cs

     文件       1346  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\Properties\AssemblyInfo.cs

     文件       2866  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\Properties\Resources.Designer.cs

     文件       5612  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\Properties\Resources.resx

     文件       1094  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\Properties\Settings.Designer.cs

     文件        249  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\Properties\Settings.settings

     文件        863  2018-08-13 20:23  OpenMxdVS2010\OpenMxd.sln

    ..A..H.     23552  2018-08-13 22:13  OpenMxdVS2010\OpenMxd.suo

     目录          0  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\obj\x86\Debug\TempPE

     目录          0  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\obj\x86\Debug

     目录          0  2018-08-13 22:12  OpenMxdVS2010\OpenMxd\bin\Debug

     目录          0  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\obj\x86

     目录          0  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\bin

     目录          0  2018-08-13 20:23  OpenMxdVS2010\OpenMxd\obj

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

评论

共有 条评论