06 2012 档案

Xml 根据路径和属性值获取节点
摘要:XmlDocument xmlDoc = getXmlDoc.GetXmlDocByXmlName("材料信息");//获取config目录下 材料信息.xml XmlNodeList nodeList = xmlDoc.SelectNodes("/root/talbeName[@name='主表名']");//主表节点集合获取root/tablename 并且 tablename的name属性为主表名 的节点。 阅读全文

posted @ 2012-06-28 10:34 imihiro 阅读(4201) 评论(0) 推荐(1)

C# 客户端程序打包(制作exe)
摘要:123 阅读全文

posted @ 2012-06-27 10:27 imihiro 阅读(648) 评论(0) 推荐(0)

AE shp属性查询、空间查询 IQueryFilter和ISpatialFilter
摘要:IQueryFilter public void IQueryFilter_SpatialResolution(IFeatureClass featureClass) { IQueryFilter2 queryFilter2 = new QueryFilterClass(); //there is no with statement in C# queryFilter2.WhereClause = "STATE_NAME = 'California'"; queryFilter2.SpatialResolution = 500... 阅读全文

posted @ 2012-06-25 22:29 imihiro 阅读(4976) 评论(0) 推荐(0)

C# 字符串 包含中文
摘要:/// <summary> /// 判断字符串 是否含有中文 /// </summary> /// <param name="str"></param> /// <returns></returns> private bool ContainCHChar(string str) { int chnfrom = Convert.ToInt32("4e00", 16); int chnend = Convert.ToInt32("9fff",16); ... 阅读全文

posted @ 2012-06-25 21:20 imihiro 阅读(761) 评论(0) 推荐(0)

C# 文件夹拷贝 迭代
摘要:/// <summary> /// 文件夹拷贝 /// </summary> /// <param name="sourDir"></param> /// <param name="projectID"></param> /// <param name="programID"></param> /// <returns></returns> private static bool CopyTo(DirectoryIn 阅读全文

posted @ 2012-06-25 16:12 imihiro 阅读(331) 评论(0) 推荐(0)

C# DateTimePicker控件设置空时间
摘要://在DateTime旁边添加一个清空按钮. private void btnClearRegTime_Click(object sender, EventArgs e) { MessageBox.Show("Text:" + dtpRegTime.Text + "\nValue:" + dtpRegTime.Value.ToString()); dtpRegTime.CustomFormat = " "; MessageBox.Show("Text:" + dtpRegTime.Text + "... 阅读全文

posted @ 2012-06-18 10:47 imihiro 阅读(2552) 评论(0) 推荐(0)

C# DateTime赋值为null
摘要:DateTime和int,double一样,是值类型。在任何情况下都有值.解决方式是赋值一个不会被用的值,比如DateTime.MinValue; 阅读全文

posted @ 2012-06-18 10:20 imihiro 阅读(5700) 评论(0) 推荐(0)

SOP 中的 Service
摘要:Service Oriented Programming中。Service 就是开机自动运行的exe.在"服务"中右键 属性,可以查看对应的exe. 阅读全文

posted @ 2012-06-15 11:44 imihiro 阅读(207) 评论(0) 推荐(0)

SDE 远程连接
摘要:描述: 安装了SDE9.3 For SQLServer,本机Catlog能连上.远程Catlog不能连上原因:SDE服务exe被防火墙禁止。解决方式: 找到sde服务exe,在服务上右键-->属性。 可执行文件路径:"C:\Program Files\ArcGIS\ArcSDE\sqlexe\bin\giomgr.exe“ 在控制面板-->window防火墙-->例外中添加giomgr.exe程序. 阅读全文

posted @ 2012-06-15 11:41 imihiro 阅读(391) 评论(0) 推荐(0)

SDE 远程连接 失败
摘要:描述: 安装了SDE9.3 For SQLServer,本机Catlog能连上.远程Catlog不能连上原因:SDE服务exe被防火墙禁止。解决方式: 找到sde服务exe,在服务上右键-->属性。 可执行文件路径:"C:\Program Files\ArcGIS\ArcSDE\sqlexe\bin\giomgr.exe“ 在控制面板-->window防火墙-->例外中添加giomgr.exe程序.备注:防火墙阻止sqlsvr.exe和sqlBrowser.exe, 允许giomgr.exe, sde就能正常工作. 推荐做法:防火墙禁止sqlsvr.exe和sqlB 阅读全文

posted @ 2012-06-15 11:41 imihiro 阅读(610) 评论(0) 推荐(0)

C# DateTimePicker格式设置
摘要://必须先设置Format属性为Custom,然后才能自定义格式 this.dtPicker.Format = DateTimePickerFormat.Custom; this.dtPicker.CustomFormat = "yyyy-MM-dd";效果为:2012-06-13yyyy代表年MM 代表月 (区分大小写)dd代表日期 (dddd代表星期几)具体请继续尝试 阅读全文

posted @ 2012-06-13 14:50 imihiro 阅读(15163) 评论(0) 推荐(1)

C# 正则表达式
摘要:(1)清除掉字符串中的所有<img/>标签 FrmUniscopeProfile frm = new FrmUniscopeProfile(); Regex regex = new Regex("<img .*/>"); //去除xml中的<img> MatchCollection matches = regex.Matches(htmlWin[0]); for (int i = 0; i <= matches.Count - 1; i++) { html... 阅读全文

posted @ 2012-06-12 17:11 imihiro 阅读(257) 评论(0) 推荐(0)

C# WebBrowser显示html字符串
摘要:public void NavigateToUrl(string url) { this.webBrowser1.Navigate(url); } public void ShowHtmlStr(string htmlStr) { this.webBrowser1.DocumentText = htmlStr; } 阅读全文

posted @ 2012-06-12 16:16 imihiro 阅读(7877) 评论(0) 推荐(0)

C# Math函数 字符串、整数装换
摘要:(1)16进制字符串转整数 //常用于string 颜色转 int color (例如#ffffff转 65535) string argb=node.SelectSingleNode("RenderStyle/PenStyle/PenColor").InnerText; int rgbValue = Convert.ToInt32(argb, 16); var colorSet = new string[] { "#ff880000", "#ffff0000", "#ff008800", "#ff00f 阅读全文

posted @ 2012-06-12 11:06 imihiro 阅读(646) 评论(0) 推荐(0)

C# 按钮美化技巧
摘要:(1)按钮 text设置成""(2)按钮backgroundImage设置成 想要的图片(3) ToolTip属性设置成 鼠标在上时的提示 (比如“搜索”、“删除”、“查找”) 阅读全文

posted @ 2012-06-08 16:14 imihiro 阅读(1773) 评论(0) 推荐(0)

C# TreeView Xml文件 处理优先级
摘要:xml文件作为“数据库”C# 类(如TrackManager,routparameter)作为 业务层类C# TreeView作为展示数据的界面处理技巧: 张弓先强, 擒贼先王 更新xml方法-->更新业务层类-->更新界面树 阅读全文

posted @ 2012-06-05 09:18 imihiro 阅读(298) 评论(0) 推荐(0)

visual studio 调试技巧
摘要:(1)条件命中 for(int i=0;i<=99;i++){ int k=i*i; //想在i==98为true的时候,察看k的值.怎么做? 一次次按F5,按98次. No} 解决方式: “调试”菜单-->窗口-->断点 在列表中,找到断点。 右键点击改行-->选择条件。 填入i==98. 阅读全文

posted @ 2012-06-04 15:55 imihiro 阅读(195) 评论(0) 推荐(0)

C# treeview右键菜单 设置技巧
摘要://在NodeMouseClick事件中 再将cms设定成treeview的cms. 这样点空,不会出现右键菜单. //右键菜单 private void tv_Roots_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Button != MouseButtons.Right) return; if (e.Node.Parent == null || e.Node == null) return; tv_Roots.SelectedNode = e.Node; cmsRouts.Show(tv_Root 阅读全文

posted @ 2012-06-02 14:45 imihiro 阅读(13340) 评论(2) 推荐(0)