摘要: 1//定义代理 2public delegate void ConnectionErrorDelegate(ConnectionStatus status, string msg); 3//定义代理事件 4public event ConnectionErrorDelegate ConnectionErrorEvent; 5//定义代理对象 6private ConnectionErr... 阅读全文
posted @ 2008-05-15 19:14 凡的世界 阅读(302) 评论(0) 推荐(0)
摘要: 有时net环境会出错,如果重设置小可能会解决问题 在net命令下 devenv /resetkippkgs 就行了 阅读全文
posted @ 2008-05-06 19:39 凡的世界 阅读(416) 评论(1) 推荐(0)
摘要: 这里主要使用Mutex类,该类来自System.Threading; 主要代码 bool multi=false; Mutex mu=new Mutex(true,"进程名称",out multi); if(!multi) return; 阅读全文
posted @ 2008-05-06 09:31 凡的世界 阅读(187) 评论(0) 推荐(0)
摘要: 利用api 函数 ClipCursor和GetWindowRect可以实现限定鼠标移动范围的功能。 [System.Runtime.InteropServices.DllImport("user32", EntryPoint = "ClipCursor")] public extern static int ClipCursor(ref RECT lpRect); ... 阅读全文
posted @ 2008-04-23 10:13 凡的世界 阅读(2186) 评论(0) 推荐(0)
摘要: 太难了,网上的资料不够完整,整理了一下 具体思路是,将自定义安装类 的输出文件添加到安装自定义操作中,设置其CustomActionData属性值为: /setupSourceDir="[SourceDir]\" SourceDir就是打包程序路径了 在这个类中可以通过Context.Parameters["setupSourceDir"].ToString()来获取这给路径 阅读全文
posted @ 2008-04-11 16:22 凡的世界 阅读(352) 评论(0) 推荐(0)
摘要: Asp.net中 FileUpload控件默认只能上传4M的文件 如果要修改得 在配置文件中添加如下节点 加大允许的大小和等待时间 阅读全文
posted @ 2008-04-09 15:29 凡的世界 阅读(303) 评论(0) 推荐(0)
摘要: 在GridView自定义执行控件操作的时候,获取操作行索引的方法如下 int index = ((GridViewRow)(((Button)(e.CommandSource)).Parent.Parent)).RowIndex; 如果用GridView自带按钮执行操作时 int i = Convert.ToInt32(e.CommandArgument); 阅读全文
posted @ 2008-04-09 14:21 凡的世界 阅读(1136) 评论(0) 推荐(0)
摘要: ftp断点上传 阅读全文
posted @ 2008-04-07 14:08 凡的世界 阅读(1205) 评论(0) 推荐(0)
摘要: ftp 服务器命令列表 阅读全文
posted @ 2008-04-03 10:59 凡的世界 阅读(2578) 评论(0) 推荐(0)
摘要: enum mycity { beijing,shanghai } 枚举的遍历 foreach( mycity city in enum.getvalues( typeof( mycity ) ) ) { } 字符串转枚举 mycity enumtype; string strTypeB =... 阅读全文
posted @ 2008-04-01 13:30 凡的世界 阅读(510) 评论(0) 推荐(0)