示例#1
0
        public FileWatcher()
        {
            string settlementDir = tk.GetDirectoryName() + "\\settlement";

            watcher = new FileSystemWatcher(@settlementDir);
            watcher.EnableRaisingEvents   = true;
            watcher.IncludeSubdirectories = true;
            watcher.Created += watcher_Created;
            watcher.Renamed += wathcer_Renamed;
            watcher.Deleted += watcher_Deleted;
            newFile          = new List <string>();
        }