Ejemplo n.º 1
0
        internal void RaiseCobolFileChanged(CobolFileChangedEvent fileEvent)
        {
            EventHandler <CobolFileChangedEvent> cobolFileChanged = CobolFileChanged;

            if (cobolFileChanged != null)
            {
                cobolFileChanged(this, fileEvent);
            }
        }
Ejemplo n.º 2
0
        void fileSystemWatcher_Changed(object sender, FileSystemEventArgs e)
        {
            LocalCobolFile localCobolFile;

            if (filesToMonitor.TryGetValue(e.FullPath, out localCobolFile))
            {
                CobolFileChangedEvent changedEvent = new CobolFileChangedEvent(CobolFileChangeType.FileChanged, DateTime.Now, null);
                localCobolFile.RaiseCobolFileChanged(changedEvent);
            }
        }
 void fileSystemWatcher_Renamed(object sender, RenamedEventArgs e)
 {
     LocalCobolFile localCobolFile;
      if (filesToMonitor.TryGetValue(e.FullPath, out localCobolFile))
      {
          CobolFileChangedEvent renamedEvent = new CobolFileChangedEvent(CobolFileChangeType.FileRenamed, DateTime.Now, e.FullPath);
          localCobolFile.RaiseCobolFileChanged(renamedEvent);
      }
 }
 void fileSystemWatcher_Deleted(object sender, FileSystemEventArgs e)
 {
     LocalCobolFile localCobolFile;
      if(filesToMonitor.TryGetValue(e.FullPath, out localCobolFile))
      {
          CobolFileChangedEvent deletedEvent = new CobolFileChangedEvent(CobolFileChangeType.FileDeleted, DateTime.Now, null);
          localCobolFile.RaiseCobolFileChanged(deletedEvent);
      }
 }
Ejemplo n.º 5
0
 public void OnCobolFileChanged(object sender, CobolFileChangedEvent fileEvent)
 {
     if (fileEvent.Type == CobolFileChangeType.FileChanged)
     {
         textDocument.LoadChars(cobolFile.ReadChars());
     }
     else
     {
         throw new InvalidOperationException("File change type " + fileEvent.Type + " is not supported in this configuration");
     }
 }
Ejemplo n.º 6
0
 internal void RaiseCobolFileChanged(CobolFileChangedEvent fileEvent)
 {
     EventHandler<CobolFileChangedEvent> cobolFileChanged = CobolFileChanged;
     if(cobolFileChanged != null)
     {
         cobolFileChanged(this, fileEvent);
     }
 }