コード例 #1
0
 private void ShowFileDialog(AddSimpleFile addFile)
 {
     if (addFile.ShowDialog(this).Equals(DialogResult.OK))
     {
         base.wrapper.BitsJob.AddFile(addFile.RemoteName, addFile.LocalName);
         base.wrapper.FileList        = null;
         base.wrapper.DeleteLocalFile = addFile.DeleteLocalFile;
         this.UpdateControl();
     }
     else if (base.wrapper.BitsJob.Files.Count == 0)
     {
         base.FindForm().DialogResult = DialogResult.Abort;
     }
 }
コード例 #2
0
 private void ShowAddFileDialog()
 {
     base.FindForm().Activate();
     if (base.wrapper.FileList != null)
     {
         switch (base.wrapper.FileList.Length)
         {
         case 0:
         case 1:
         {
             AddSimpleFile addFile = new AddSimpleFile();
             addFile.InitControl(base.wrapper);
             this.ShowFileDialog(addFile);
             return;
         }
         }
         MessageBox.Show(this, "Operation with multiple files are not supported currently. Please add only one file at a time for now!\r\nAlso note, due to restrictions in BITS, upload jobs will always only support one file per job.");
     }
 }