我的代码中有一些问题:
private void start_watcher()
{
fswFiler = new FileSystemWatcher(Control.filer.get_path(),"*.*");
//fswStorage = new FileSystemWatcher(Control.storage.get_path());
fswFiler.Changed += new FileSystemEventHandler(updatePend);
fswFiler.Deleted += new FileSystemEventHandler(updatePend);
fswFiler.Created += new FileSystemEventHandler(updatePend);
fswFiler.Renamed += new RenamedEventHandler(updatePend);
fswFiler.EnableRaisingEvents = true;
}
private void updatePend(object sender, FileSystemEventArgs e)
{
this.viewPend.Nodes.Clear();
Control.filer.refresh_files_list();
this.viewPend.Nodes.Add(Control.filer.get_files_node());
}
把我赶出计划。知道为什么会这样吗?