摘要:
最简单的办法:string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();方法一:public void GetFileVersion() {FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(Path路径字符串);string AssmblyVersion=myFileVersionInfo.FileVersion;}方法二:[assembly: AssemblyTitle("")][assemb 阅读全文
摘要:
// 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. 阅读全文
摘要:
次线程不能直接修改主线程UI的界面,需要使用以下方法this.Dispatcher.Invoke(DispatcherPriority.Normal,new Action(() =>{ //调用主线程UI的的代码 }));如:void LoadFile() { try { if (string.IsNullOrEmpty(filename)) { //加载建设中 return; ... 阅读全文