随笔分类 -  C#.NET

上一页 1 2

.NET 文件夹拷贝
摘要:/// <summary> /// 文件夹拷贝 /// </summary> /// <param name="sPath"></param> /// <param name="dPath"></param> /// <returns></returns> public static string CopyTin(string sPath, string dPath) { string flag = "success"; try ... 阅读全文

posted @ 2012-05-10 14:41 imihiro 阅读(302) 评论(0) 推荐(0)

Static Class 存储配置信息
摘要:public static class Configuration { static string _shpFolder; static string _shpName; static Configuration() { _shpFolder = @"E:\CZShapes"; _shpName = "funPolygon"; } public static string ShpFolder { get { return _shpFolde... 阅读全文

posted @ 2012-05-10 14:22 imihiro 阅读(221) 评论(0) 推荐(0)

FileStream, 创建txt、xml文件
摘要:/// <summary> /// 创建python文件 /// </summary> /// <param name="shpparam"></param> /// <param name="tinworkspace"></param> /// <param name="tinname"></param> /// <param name="savepath"></param> public st 阅读全文

posted @ 2012-05-09 17:30 imihiro 阅读(489) 评论(0) 推荐(0)

函数图象绘制 控件 ntgraph
摘要:http://wenku.baidu.com/view/c34e4507e87101f69e319509.html 阅读全文

posted @ 2012-05-08 21:19 imihiro 阅读(303) 评论(0) 推荐(0)

C#画图闪烁
摘要:http://www.cnblogs.com/Cybean/archive/2012/01/12/2321014.html其他方式: 将图元控件中的内容分为经常刷新和很少刷新两部分。 在控件上添加picturebox,将很少刷新的部分写道内存中存为bitmap,然后显示在pictureBox中。 Bitmap bmp = ProfileBitmap(this._lilines, toltallength); this.pictureBox1.Image = bmp as Image; public Bitmap ProfileBitmap(List<... 阅读全文

posted @ 2012-05-06 17:13 imihiro 阅读(446) 评论(0) 推荐(0)

form常见操作
摘要:http://apps.hi.baidu.com/share/detail/16571831窗体首次显示 private void FrmProfile_Shown(object sender, System.EventArgs e) { this.DrawAll();//首次显示窗体 绘制剖面线 }窗体只能在指定区域内移动方法一:1> 父窗体和子窗体都继承了Form类 2>父窗体的IsMdiContainer属性设置成true 3>子窗体的MdiFather属性设置成父窗体效果: 子窗体无法出父窗体的范围消息,禁止窗体移动ht... 阅读全文

posted @ 2012-05-06 14:10 imihiro 阅读(168) 评论(0) 推荐(0)

用后立即调用Dispose
摘要:Robust ProgrammingYou should always call Dispose on any objects that consume system resources, such as Pen objects. 阅读全文

posted @ 2012-04-28 17:10 imihiro 阅读(179) 评论(0) 推荐(0)

获取鼠标点击处的颜色
摘要:官方代码:ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.chs/enu_kbnetframeworkkb/netframeworkkb/892462.htm 阅读全文

posted @ 2012-04-28 15:21 imihiro 阅读(730) 评论(0) 推荐(0)

UserControl 实现From_Close
摘要:使用容器.Controls.Remove方法http://social.msdn.microsoft.com/Forums/pt-BR/232/thread/55c4698f-2d5c-4428-934a-aba60df640ec this.Parent.Controls.Remove(this as Control); 阅读全文

posted @ 2012-04-27 11:15 imihiro 阅读(389) 评论(0) 推荐(0)

regasm.exe 注册dll
摘要:(1)在计算机搜索regasm.exe(2)打开cmd,将regasm.exe拖动到控制台窗体中(3)输入命令 -help . 可以查看用法。总结:自己编写程序生成的dll,用此法可注册。 阅读全文

posted @ 2012-04-22 00:48 imihiro 阅读(4637) 评论(0) 推荐(0)

注册表获取exe位置+ Process类启动exe+参数让exe打开指定文件
摘要:/// <summary> /// 启动本机的cad,并且在cad中浏览dwg图 /// </summary> /// <param name="path">cad.exe的位置</param> /// <param name="dwgfile">dwgfile的完整路径</param> public void StartCad2004(string path,string dwgfile) { Process p = new Process(); p.Start... 阅读全文

posted @ 2012-04-21 15:45 imihiro 阅读(1678) 评论(0) 推荐(0)

安装部署程序,将安装目录写入注册表
摘要:(1)在“安装部署项目”上点击“注册表编辑器”(2)在HKey_LOCAL_MACHINE_SoftWare下新建键 Manufacturer 代表软件的制造商。(3)右键à新增字符串值,设置Name和Value属性。NameNewPrjClientValue @[TARGETDIR]NewPrjClient.exe [TARGETDIR]代表用户选择的安装目录。 NewPrjClient.exe 代表exe的名称。 这个键记录安装程序的完整位置运行Setup.exe 完成安装。查看注册表,看效果。(4)读取exe路径: string path=Registry.Gt(****); 阅读全文

posted @ 2012-04-21 15:35 imihiro 阅读(1416) 评论(0) 推荐(0)

上一页 1 2