资源简介
ARCENGINE要素编辑代码
代码片段和文件信息
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;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
IFeaturelayer m_featurelayer = null;
IFeature m_feature = null;
IActiveView m_activeview = null;
string stroperstor = ““;
IMovePointFeedback m_movePointFeedback = new MovePointFeedbackClass();
IMoveLineFeedback m_moveLineFeedback = new MoveLineFeedbackClass();
IMovePolygonFeedback m_movePolygonFeedback = new MovePolygonFeedbackClass();
public Form1()
{
InitializeComponent();
string filepath = @“E:\教学软件\ARCGIS\gis数据\gis_ex09\ex09\ex09.mxd“;
axMapControl1.LoadMxFile(filepath 0 Type.Missing);
for (int i = 0; i yerCount; i++)
{
ilayer layer = this.axMapControl1.get_layer(i);
this.comboBox1.Items.Add(layer.Name);
}
}
private void comboBox1_TextChanged(object sender EventArgs e)
{
if (comboBox1.Text != ““)
{
for(int i=0;iyerCount;i++)
{
ilayer layer=this.axMapControl1.get_layer(i);
if (comboBox1.Text.ToString() == layer.Name)
{
m_featurelayer =layer as IFeaturelayer;
m_feature = m_featurelayer.FeatureClass.GetFeature(0);
if (m_feature != null)
{
this.axMapControl1.Map.ClearSelection();
this.axMapControl1.Map.SelectFeature(m_featurelayerm_feature);
this.axMapControl1.Refresh();
}
m_activeview = this.axMapControl1.ActiveView;
return;
}
}
}
}
private void button1_Click(object sender EventArgs e)
{
stroperstor = “move“;
m_movePointFeedback = new MovePointFeedbackClass();
m_moveLineFeedback = new MoveLineFeedbackClass();
m_movePolygonFeedback = new MovePolygonFeedbackClass();
}
private void button2_Click(object sender EventArgs e)
{
IPointCollection pointCollection;
if (m_feature.Shape.GeometryType == esriGeometryType.esriGeometryPolyline)
{
pointCollection = new PolylineClass();
IPolyline polyline =m_feature.Shape as IPolyline;
pointCol
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 17408 2011-11-16 21:33 要素编辑\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
I.A.... 30208 2011-11-16 21:33 要素编辑\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
I.A.... 14328 2011-11-16 21:32 要素编辑\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
I.A.... 490 2009-06-11 05:14 要素编辑\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
I.A.... 5212 2011-11-14 12:12 要素编辑\WindowsFormsApplication1\FeatureEdit.csproj
I.A.... 911 2011-11-16 21:34 要素编辑\WindowsFormsApplication1\FeatureEdit.sln
I.A..H. 18944 2011-11-16 21:34 要素编辑\WindowsFormsApplication1\FeatureEdit.suo
I.A.... 11096 2011-11-16 21:33 要素编辑\WindowsFormsApplication1\Form1.cs
I.A.... 6879 2011-11-16 21:30 要素编辑\WindowsFormsApplication1\Form1.Designer.cs
I.A.... 9422 2011-11-16 21:30 要素编辑\WindowsFormsApplication1\Form1.resx
I.A.... 112754 2011-11-14 21:07 要素编辑\WindowsFormsApplication1\obj\Debug\ResolveAssemblyReference.cache
I.A.... 1051 2011-11-16 21:32 要素编辑\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
I.A.... 847 2011-11-16 21:30 要素编辑\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
I.A.... 17408 2011-11-16 21:33 要素编辑\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe
I.A.... 2641 2011-11-16 21:30 要素编辑\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources
I.A.... 30208 2011-11-16 21:33 要素编辑\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb
I.A.... 180 2011-11-14 12:12 要素编辑\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Properties.Resources.resources
I.A.... 505 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\Program.cs
I.A.... 1380 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\Properties\AssemblyInfo.cs
I.A.... 2898 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\Properties\Resources.Designer.cs
I.A.... 5612 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\Properties\Resources.resx
I.A.... 1109 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\Properties\Settings.Designer.cs
I.A.... 249 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\Properties\Settings.settings
I..D... 0 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\obj\Debug\TempPE
I..D... 0 2011-11-14 11:16 要素编辑\WindowsFormsApplication1\bin\Debug
I..D... 0 2011-11-16 21:33 要素编辑\WindowsFormsApplication1\obj\Debug
I..D... 0 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\bin
I..D... 0 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\obj
I..D... 0 2011-11-14 11:10 要素编辑\WindowsFormsApplication1\Properties
I..D... 0 2011-11-16 21:34 要素编辑\WindowsFormsApplication1
............此处省略4个文件信息
- 上一篇:代数学引论第二版第三章答案
- 下一篇:BP文件提取.rar
评论
共有 条评论