Ejemplo n.º 1
0
 private void FileModifiedEvent(object sender, FileEvent e)
 {
     if (e.ChangeType == FileEventChangeType.Changed || e.ChangeType == FileEventChangeType.Renamed)
     {
         lock (recentlyModifiedShaders)
         {
             recentlyModifiedShaders.Add(Path.GetFileNameWithoutExtension(e.Name));
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Called when a file event occured.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The file event.</param>
 protected virtual void OnModified(object sender, FileEvent e)
 {
     var handler = Modified;
     if (handler != null) handler(sender, e);
 }
Ejemplo n.º 3
0
        private void directoryWatcher_Modified(object sender, FileEvent e)
        {
            // If tracking is not enabled, don't bother to track files on disk
            if (!EnableTracking)
                return;

            // Store only the most recent events
            lock (fileEvents)
            {
                fileEvents.Add(e);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Called when a file event occurred.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The file event.</param>
 protected virtual void OnModified(object sender, FileEvent e)
 {
     Modified?.Invoke(sender, e);
 }