摘要:
读写文件一开始看似困难,其实内容并不多。例如: string path = @"D:\01.txt"; FileStream fs = new FileStream(path,FileMode.Create); StreamWriter sw = new StreamWriter(fs); sw.WriteLine("aabbb"); sw.WriteLine("bb"); sw.Close(); 阅读全文
摘要:
读写文件一开始看似困难,其实内容并不多。例如: string path = @"D:\01.txt"; FileStream fs = new FileStream(path,FileMode.Create); StreamWriter sw = new StreamWriter(fs); sw.WriteLine("aabbb"); sw.WriteLine("bb"); sw.Close(); 阅读全文
摘要:
WPF不同线程之间的控件是不同访问的,为了能够访问其他线程之间的控件,需要用Dispatcher.Invoke执行一个新的活动即可。例如: public void SetNotes(string notes) { if (Dispatcher.Thread != Thread.CurrentThread) { this.txtNote.Dispatcher.Invoke(new Action(() => { this.txt... 阅读全文
|