Ejemplo 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;
 }
Ejemplo n.º 2
0
 private string ConfigPath() => $"{Qsvi.Path()}config\\qupload.{ID.GetHashCode()}.config";
Ejemplo n.º 3
0
 private string Bucket(bool content) => content ? $"\"{Qsvi.GetAttribute(ID, MethodBase.GetCurrentMethod().Name)}\"" : MethodBase.GetCurrentMethod().Name.ToLower();
Ejemplo n.º 4
0
 private string Src_dir(bool content) => content ? $"\"{Qsvi.GetInnerText(ID)}\"" : MethodBase.GetCurrentMethod().Name.ToLower();
Ejemplo n.º 5
0
 private void Sync() => Qsvi.QshellCmd($"qupload \"{Qsvi.Path()}config\\qupload.{ID.GetHashCode()}.config\"");