摘要:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe path+SelectCommands.dll /tlb:SelectCommands.tlb /codebase(红色部分为自定义插件的名字) 阅读全文
摘要:
测量任意两个Geometry的距离,可以用IProximityOperator这个接口,但是测量出来的是经纬度 阅读全文
摘要:
StringBuilder builder = new StringBuilder(); builder.Append(c); builder.ToString(); 阅读全文
摘要:
扩展对象的方法:(必须在静态类中)public static bool CompareColor(this Color color,Color compareColor) { if (color.A == compareColor.A && color.R == compareColor.R && color.G == compareColor.G && color.B == compareColor.B) { return true; } else return false; }想要扩展对象的属性就要继承类,然后自己写属性,此对象与继承的对象有 阅读全文
摘要:
遍历图层组时,将图层组layer转换成ICompositeLayer,然后遍历里面的图层 阅读全文
摘要:
刷新图层:pMap.PartialRefresh(esriViewGeography, pLayer, null); 刷新所有图层:pMap.PartialRefresh(esriViewGeography, null, null); 刷新所选择的对象:pMap.PartialRefresh(esriViewGeoSelection, null, null); 刷新标注:pMap.PartialRefresh(esriViewGraphics, null, null); 刷新图元pLayout.PartialRefresh(esriViewGraphics, pElement, null); 阅读全文
摘要:
在窗体类的最外面定义一个委托:public delegate void SelectPointHandler(object sender, PointObject point);pointobject为传递的参数在窗体的事件下:private void btnOK_Click(object sender, EventArgs e) {。。。。。。。 if (SelectedPoint != null) SelectedPoint(this, point); } public event SelectPointHan... 阅读全文
摘要:
private void btnAnalyze_Click(object sender, EventArgs e) { if (treeList1.Nodes.Count < 2) { XtraMessageBox.Show("请选择至少两个节点!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } labelControl1.Visible = true;... 阅读全文
摘要:
主要部分代码,参数来源略 Geoprocessor gp = new Geoprocessor(); gp.OverwriteOutput = true; ESRI.ArcGIS.AnalysisTools.Buffer pbuffer = new ESRI.ArcGIS.AnalysisTools.Buffer(); pbuffer.in_features = pFeLayer; pbuffer.buffer_distance_or_field = Convert.ToString((this.textBox1.Text)) + " " + (string)this.co 阅读全文
摘要:
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 System.Data.OleDb;namespace 将数据从excel中导入到access中{ public partial class Form1 : Form { public Form1() { InitializeCompo 阅读全文