上一页 1 ··· 12 13 14 15 16
摘要: 图层元素识别,用于点选或者框选// 接受识别数据的数组IArray pIDArray;/// 创建包络区域IEnvelope pEnv;/// 包络区域的四个边界的指定r.bottom = e.y + 5;r.top = e.y - 5;r.left = e.x - 5;r.right = e.x + 5;//也可以自定义画框来识别// pEnv = axMapControl1.TrackRectangle();// 创建识别接口,并将要识别的图层定义为识别接口IIdentify pIdentify;pIdentify = (IIdentify)GetGallery(this.ActiveGa 阅读全文
posted @ 2012-09-05 15:10 oftenlin 阅读(329) 评论(0) 推荐(0) 编辑
摘要: ArcGIS 基本函数(地图操作)获得焦点axMapControl1.Focus();设置中心点axMapControl1.CenterAt(pt);设定比例尺int scale = 1000;axMapControl1.MapScale = scale;得到图层数量int layerCnt = axMapControl1.LayerCount;按照索引得到当前图层ILayer layer = axMapControl1.get_Layer(i);闪烁某个元素IGeometry iGeometry pGeometry= ppt as IGeometry;mapControl.FlashShap 阅读全文
posted @ 2012-09-05 15:09 oftenlin 阅读(3075) 评论(0) 推荐(0) 编辑
摘要: string strPath = "F:\\汇总--路段速度\\";// 路径DirectoryInfo mydir=new DirectoryInfo(strPath); // 得到文件列表FileInfo[] files=mydir.GetFiles();string filePath = mydir + files[i].Name;//以流的形式打开文本文件FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);// 创建readerstreamReader st 阅读全文
posted @ 2012-09-05 15:05 oftenlin 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.在web.config网页应用程序或者app.config (桌面应用程序)中添加,好像是必须在<configuration> </configuration>下添加 <appSettings> <add key="connstring" value="uid=sa;pwd=123456;database=bjtrc;server=(local)" /> </appSettings>2.添加引用 using System.Configuration;3.利用 string strConn = 阅读全文
posted @ 2012-09-05 15:01 oftenlin 阅读(2589) 评论(0) 推荐(0) 编辑
摘要: /*可能回由于office版本问题造成异常*/protected void ExportExcel(System.Data.DataTable dt,string fileName){ if (dt == null || dt.Rows.Count == 0) return; Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == null) { return; } System.Globalization.Cult... 阅读全文
posted @ 2012-09-05 14:54 oftenlin 阅读(637) 评论(0) 推荐(0) 编辑
摘要: DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn(); col1.HeaderText = "姓名"; col1.DataPropertyName = "Name"; col1.Name = "Name"; col1.Width = 100; DataGridViewTextBoxColumn col2 = new DataGridViewTextBoxColumn(); col2.HeaderText = "性别"; col2.DataP 阅读全文
posted @ 2012-07-31 13:27 oftenlin 阅读(2574) 评论(0) 推荐(1) 编辑
上一页 1 ··· 12 13 14 15 16