示例#1
0
        private void synchronizeOnDrivesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var syncFolderTask = new SynchronizeDriveEmptyFolderTask(Account,
                                                                     FolderInfo.AccountName, 0, new AsyncTask[0], FolderInfo.File);

            TaskManager.Add(syncFolderTask);
            foreach (ListViewItem item in fileListView.SelectedItems)
            {
                var info = (NodeInfo)item.Tag;
                if (info.File.DriveFiles.Count < Account.Drives.Count)
                {
                    TaskManager.Add(new SynchronizeDriveFileTask(Account, info.AccountName, 0, new AsyncTask[] { syncFolderTask }, info.File));
                }
            }
        }
示例#2
0
 public void CreateFolder()
 {
     if (FolderNode == null)
     {
         return;
     }
     using (var dialog = new CreateFolderForm())
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             var syncDestFolderTask = new SynchronizeDriveEmptyFolderTask(Account,
                                                                          FolderInfo.AccountName, AsyncTask.NormalPriority, null, FolderInfo.File);
             TaskManager.Add(syncDestFolderTask);
             TaskManager.Add(new CreateFolderTask(Account, FolderInfo.AccountName,
                                                  AsyncTask.NormalPriority, new AsyncTask[] { syncDestFolderTask }, dialog.DirecotryName, FolderInfo.File)
             {
                 Tag = FolderNode
             });
         }
     }
 }