刘sir

春不是叫出来的,是真刀实枪干出来的!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年7月21日

摘要: 最简单的办法:string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();方法一:public void GetFileVersion() {FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(Path路径字符串);string AssmblyVersion=myFileVersionInfo.FileVersion;}方法二:[assembly: AssemblyTitle("")][assemb 阅读全文
posted @ 2013-07-21 18:05 刘sir~ 阅读(1847) 评论(0) 推荐(0) 编辑

摘要: // Get Stream of the filefileReader = new StreamReader(File.Open(this.FileName, FileMode.Open));FileInfo fileInfo = new FileInfo(this.FileName);long bytesRead = 0;// Change the 75 for performance. Find a number that suits your application bestint bufferLength = 1024 * 75;while (!fileReader.EndOfStr. 阅读全文
posted @ 2013-07-21 14:11 刘sir~ 阅读(440) 评论(0) 推荐(0) 编辑

摘要: 次线程不能直接修改主线程UI的界面,需要使用以下方法this.Dispatcher.Invoke(DispatcherPriority.Normal,new Action(() =>{ //调用主线程UI的的代码 }));如:void LoadFile() { try { if (string.IsNullOrEmpty(filename)) { //加载建设中 return; ... 阅读全文
posted @ 2013-07-21 12:59 刘sir~ 阅读(776) 评论(0) 推荐(0) 编辑