Exemplo n.º 1
0
 public Task(string ID)
 {
     this.ID = ID;
     syncDir = new FileSystemWatcher()
     {
         Path   = Qsvi.GetInnerText(ID),
         Filter = "*.*"
     };
     syncDir.Changed              += new FileSystemEventHandler(OnProcess);
     syncDir.Created              += new FileSystemEventHandler(OnProcess);
     syncDir.Deleted              += new FileSystemEventHandler(OnProcess);
     syncDir.Renamed              += new RenamedEventHandler(OnRenamed);
     syncDir.NotifyFilter          = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size;
     syncDir.IncludeSubdirectories = true;
 }
Exemplo n.º 2
0
 private string Src_dir(bool content) => content ? $"\"{Qsvi.GetInnerText(ID)}\"" : MethodBase.GetCurrentMethod().Name.ToLower();