Exemple #1
0
 public async Task AddFiles(string[] collection)
 {
     Task task = Task.Run(() =>
     {
         foreach (string path in collection)
         {
             BatchItem item = new BatchItem()
             {
                 Actions = Functions
             };
             if (BatchPath.IsDirectory(path))
             {
                 item.Target = new BatchDirectory(path);
             }
             if (BatchPath.IsFile(path))
             {
                 item.Target = new BatchFile(path);
             }
             Items.Add(item);
             item.Commit();
         }
         RefreshDisplay();
     });
     await task;
 }
Exemple #2
0
        public virtual BatchPath GetPath(BatchPath path)
        {
            BatchPath clone = path.Clone();

            clone.FullName = Path.Combine(path.GetParent(), GetString(path.Name));
            return(clone);
        }