M
Matthew lOck
Hi, I am trying to use the OpenNETCF FileSystemWatcher to watch for a
file changed or created event but it will not fire any events. I have
messed around with the directory, file extension filter, notify filter
without any luck. I am using Windows Mobile 5 (HP HX2750), and .NET CF
2.0. Has anyone got this to work on WM5? Does it require the latest
version of the OpenNETCF (Version 2.0 - $50), or is it possible for the
free 1.4 version to work?
My Code is:
OpenNETCF.IO.FileSystemWatcher watcher = new
OpenNETCF.IO.FileSystemWatcher(@"\", "");
watcher.EnableRaisingEvents = false;
watcher.NotifyFilter = OpenNETCF.IO.NotifyFilters.FileName |
OpenNETCF.IO.NotifyFilters.LastWrite | OpenNETCF.IO.NotifyFilters.Size
| OpenNETCF.IO.NotifyFilters.CreationTime;
watcher.Changed += new
OpenNETCF.IO.FileSystemEventHandler(watcher_Changed);
watcher.Created += new
OpenNETCF.IO.FileSystemEventHandler(watcher_Created);
watcher.Renamed += new
OpenNETCF.IO.RenamedEventHandler(watcher_Renamed);
watcher.EnableRaisingEvents = true;
Thanks in advance.
Matthew
file changed or created event but it will not fire any events. I have
messed around with the directory, file extension filter, notify filter
without any luck. I am using Windows Mobile 5 (HP HX2750), and .NET CF
2.0. Has anyone got this to work on WM5? Does it require the latest
version of the OpenNETCF (Version 2.0 - $50), or is it possible for the
free 1.4 version to work?
My Code is:
OpenNETCF.IO.FileSystemWatcher watcher = new
OpenNETCF.IO.FileSystemWatcher(@"\", "");
watcher.EnableRaisingEvents = false;
watcher.NotifyFilter = OpenNETCF.IO.NotifyFilters.FileName |
OpenNETCF.IO.NotifyFilters.LastWrite | OpenNETCF.IO.NotifyFilters.Size
| OpenNETCF.IO.NotifyFilters.CreationTime;
watcher.Changed += new
OpenNETCF.IO.FileSystemEventHandler(watcher_Changed);
watcher.Created += new
OpenNETCF.IO.FileSystemEventHandler(watcher_Created);
watcher.Renamed += new
OpenNETCF.IO.RenamedEventHandler(watcher_Renamed);
watcher.EnableRaisingEvents = true;
Thanks in advance.
Matthew