摘要: //已知图层IFeatureLayer pFeatureLayer = this._application.MapControl2D.Map.get_Layer(0) as IFeatureLayer; IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass; if (pFeatureClass.FeatureCount(null) > 0) { for (int i = 0; i < pFeatureClass.FeatureCount(null); i++) { IFeature pFeature = pFeatureC 阅读全文
posted @ 2013-07-30 17:44 ◆紅袖 阅读(789) 评论(0) 推荐(0) 编辑
摘要: 忘记sqlserver密码怎么办,先用本机账户登录,再执行以下代码就好ALTER LOGIN sa ENABLE GO ALTER LOGIN sa WITH PASSWORD = 'password' GOALTER LOGIN [sa] WITH PASSWORD = N'123456' --不用提供旧密码123456是新密码 阅读全文
posted @ 2013-07-30 17:43 ◆紅袖 阅读(250) 评论(0) 推荐(0) 编辑
摘要: public void CreateShapefiles() { //指定路径 string strShapeFolder = AppDomain.CurrentDomain.BaseDirectory; //文件名 string strShapeName = "DisasterShow"; string path = strShapeFolder + strShapeName + ".shp"; if (File.Exists(path)) { string strFilePath = System.IO.Path.GetDirectoryName(p 阅读全文
posted @ 2013-07-30 17:41 ◆紅袖 阅读(467) 评论(0) 推荐(0) 编辑
摘要: OpenFileDialog openfile = new OpenFileDialog(); openfile.Title = "打开地图"; openfile.Filter = "(*.fly,*.mxd,*.mpt)|*.fly;*.mxd;*.mpt";这个filter可以让文件选择框选择这三种文件 阅读全文
posted @ 2013-07-30 17:40 ◆紅袖 阅读(1052) 评论(0) 推荐(0) 编辑
摘要: 由于server中名称可能相同,所以用数组存放public static Dictionary ListServices_RESTAadmin(string restAdmin, string userName, string password, string folder) { string[] serverlist = new string[1]; Dictionary pServiceType = new Dictionary(); try { string token = GenerateAGSToken_RESTAdmin(restAdmin, userName, password) 阅读全文
posted @ 2013-07-30 16:39 ◆紅袖 阅读(709) 评论(0) 推荐(0) 编辑