public static void Initialize() { mChangedProjectFiles = new ChangedFileGroup(); // Files like // the .glux and // .csproj files are // saved by Glue, but // when they change on // disk Glue needs to react // to the change. To react to // the change, Glue keeps a file // watch on these files. However // when Glue saves these files it kicks // of a file change. Therefore, any time // Glue changes one of these files it needs // to know to ignore the next file change since // it came from itself. Furthermore, multiple plugins // and parts of Glue may kick off multiple saves. Therefore // we can't just keep track of a bool on whether to ignore the // next change or not - instead we have to keep track of an int // to mark how many changes Glue should ignore. Dictionary <string, int> mChangesToIgnore = new Dictionary <string, int>(); mChangedProjectFiles.SetIgnoreDictionary(mChangesToIgnore); mChangedProjectFiles.SortDelegate = CompareFiles; //mExternallyBuiltFileWatcher = new FileSystemWatcher(); //mExternallyBuiltFileWatcher.Filter = "*.*"; //mExternallyBuiltFileWatcher.IncludeSubdirectories = true; //mExternallyBuiltFileWatcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.DirectoryName ; //mExternallyBuiltFileWatcher.EnableRaisingEvents = false; //mExternallyBuiltFileWatcher.Changed += new FileSystemEventHandler(ExternallyBuiltFileChangedEventRaised); }
public static void Initialize() { mChangedProjectFiles = new ChangedFileGroup(); mChangedProjectFiles.SetIgnoreDictionary(mChangesToIgnore); mChangedProjectFiles.SortDelegate = CompareFiles; //mExternallyBuiltFileWatcher = new FileSystemWatcher(); //mExternallyBuiltFileWatcher.Filter = "*.*"; //mExternallyBuiltFileWatcher.IncludeSubdirectories = true; //mExternallyBuiltFileWatcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.DirectoryName ; //mExternallyBuiltFileWatcher.EnableRaisingEvents = false; //mExternallyBuiltFileWatcher.Changed += new FileSystemEventHandler(ExternallyBuiltFileChangedEventRaised); }