public frmMain()
{
InitializeComponent();
if (Directory.Exists(AssemblyDirectory + "\\Grepify.Profiles"))
{
FileSystemWatcher watcher = new FileSystemWatcher();
watcher.Path = AssemblyDirectory + "\\Grepify.Profiles";
/* Watch for changes in LastAccess and LastWrite times, and
the renaming of files.*/
watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
| NotifyFilters.FileName;
// Only watch text files.
watcher.Filter = "*.txt";
// Add event handlers.
watcher.Changed += new FileSystemEventHandler(WatcherUpdateGrepifyProfiles);
watcher.Created += new FileSystemEventHandler(WatcherUpdateGrepifyProfiles);
watcher.Deleted += new FileSystemEventHandler(WatcherUpdateGrepifyProfiles);
watcher.Renamed += new RenamedEventHandler(WatcherRenameUpdateGrepifyProfiles);
// Begin watching.
watcher.EnableRaisingEvents = true;
}
//Grepifyv2 myGrepify = new Grepifyv2(AssemblyDirectory + "\\Grepify.Profiles");
}