资源简介
空间拓扑查询(ArcEngine)
代码片段和文件信息
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using ESRI.ArcGIS.ADF.baseClasses;
using ESRI.ArcGIS.ADF.CATIDs;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.SystemUI;
namespace MapControlApplication1
{
///
/// Summary description for CreateNewDocument.
///
public class CreateNewDocument : baseCommand
{
private IHookHelper m_hookHelper = null;
//constructor
public CreateNewDocument()
{
//update the base properties
base.m_category = “.NET Samples“;
base.m_caption = “NewDocument“;
base.m_message = “Create a new map“;
base.m_toolTip = “Create a new map“;
base.m_name = “DotNetTemplate_NewDocumentCommand“;
}
#region Overridden Class Methods
///
/// Occurs when this command is created
///
/// Instance of the application
public override void OnCreate(object hook)
{
if (m_hookHelper == null)
m_hookHelper = new HookHelperClass();
m_hookHelper.Hook = hook;
}
///
/// Occurs when this command is clicked
///
public override void onclick()
{
IMapControl3 mapControl = null;
//get the MapControl from the hook in case the container is a ToolbarControl
if (m_hookHelper.Hook is IToolbarControl)
{
mapControl = (IMapControl3)((IToolbarControl)m_hookHelper.Hook).Buddy;
}
//In case the container is MapControl
else if (m_hookHelper.Hook is IMapControl3)
{
mapControl = (IMapControl3)m_hookHelper.Hook;
}
else
{
MessageBox.Show(“Active control must be MapControl!“ “Warning“ MessageBoxButtons.OK MessageBoxIcon.Exclamation);
return;
}
//check to see if there is an active edit session and whether edits have been made
DialogResult result;
IEngineEditor engineEditor = new EngineEditorClass();
if ((engineEditor.EditState == esriEngineEditState.esriEngineStateEditing) && (engineEditor.HasEdits() == true))
{
result = MessageBox.Show(“Would you like to save your edits“ “Save Edits“ MessageBoxButtons.YesNoCancel MessageBoxIcon.Question);
switch (result)
{
case DialogResult.Cancel:
return;
case DialogResult.No:
engineEditor.StopEditing(false);
break;
case DialogResult.Yes:
engineEditor.StopEditing(true);
break;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-07-07 12:29 ArcEngine-master\
目录 0 2020-07-07 12:29 ArcEngine-master\.vs\
目录 0 2020-07-07 12:29 ArcEngine-master\.vs\实习5\
目录 0 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\
文件 149504 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\.suo
目录 0 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\Server\
目录 0 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\Server\sqlite3\
文件 0 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\Server\sqlite3\db.lock
文件 2125824 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\Server\sqlite3\storage.ide
文件 32768 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\Server\sqlite3\storage.ide-shm
文件 5063512 2020-07-07 12:29 ArcEngine-master\.vs\实习5\v15\Server\sqlite3\storage.ide-wal
文件 18944 2020-07-07 12:29 ArcEngine-master\MapControlApplication1.v11.suo
目录 0 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\
文件 19742 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\3170101779_邱亦宁_实习5.csproj
文件 2238 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\App.ico
目录 0 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Bookmark\
文件 4294 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Bookmark\AdmitBookmarkName.Designer.cs
文件 1797 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Bookmark\AdmitBookmarkName.cs
文件 5698 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Bookmark\AdmitBookmarkName.resx
文件 5888 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Bookmark\BookmarkNameExists.Designer.cs
文件 1321 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Bookmark\BookmarkNameExists.cs
文件 5698 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Bookmark\BookmarkNameExists.resx
文件 3770 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\CreateNewDocument.cs
目录 0 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\
文件 6487 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\AddField.Designer.cs
文件 1632 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\AddField.cs
文件 5698 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\AddField.resx
文件 13187 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\CreateShapefile.Designer.cs
文件 5489 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\CreateShapefile.cs
文件 6057 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\CreateShapefile.resx
文件 5937 2020-07-07 12:29 ArcEngine-master\MapControlApplication1\Data Operator\DataBoard.Designer.cs
............此处省略115个文件信息
- 上一篇:四叉树算法(KrigingCal)
- 下一篇:SICKLMS511 数据解析
评论
共有 条评论