如何判断文件大小一直在变化 如题.比如一个视频文件随着录制大小一直在变化,想监控其是否录制完毕. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 FileSystemWatcher watcher = new FileSystemWatcher();watcher.Filter = "*.txt";//你的文件watcher.Changed += new FileSystemEventHandler(OnChanged);watcher.EnableRaisingEvents = true; private void button1_Click(object sender, EventArgs e) { FileSystemWatcher watcher = new FileSystemWatcher("D:\\"); watcher.Filter = "新街口营业厅81116196.wav";//你的文件 watcher.Changed += new FileSystemEventHandler(OnChanged); watcher.EnableRaisingEvents = true; } private void OnChanged(object source, FileSystemEventArgs e) { WatcherChangeTypes changType = e.ChangeType; string item = ""; item += DateTime.Now.ToString() + "---"; item += e.FullPath + ":"; item += changType.ToString(); } 我的这个Onchanged事件怎么不执行呢 你怎么判断它没有执行的。 把item显示出来看看。 因为我加入断点跟踪,它根本就没跳到Onchanged事件 .net 连接DB2数据库错误,请高手帮忙看看 ORACLE在CS的客户端调用求教 c#的项目怎么逆向工程出类图?用visio或者EA RichtextBox选择过度问题 DataGridView的KeyPress事件 C#怎样识别笔记本电脑是工作在外接电源还是电池状态? vs调试时无法连接localhost web服务器 (资源共享)? 如何用C#代码控制鼠标在屏幕上移动、点击、停留????????解决马上给分(50) 网络软件中更新远程数据库记录是使用WEB服务还是Socket或其他? 问一道byte[]转换成字符串的问题 有人用C#做过 ZEBRA打印机打印汉字的程序吗?
watcher.Filter = "*.txt";//你的文件
watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.EnableRaisingEvents = true;
{
FileSystemWatcher watcher = new FileSystemWatcher("D:\\");
watcher.Filter = "新街口营业厅81116196.wav";//你的文件
watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.EnableRaisingEvents = true; }
private void OnChanged(object source, FileSystemEventArgs e)
{
WatcherChangeTypes changType = e.ChangeType;
string item = "";
item += DateTime.Now.ToString() + "---";
item += e.FullPath + ":";
item += changType.ToString(); }
我的这个Onchanged事件怎么不执行呢