public FormProgressBar()
 {
     backgroundWorker      = new BackgroundWorker();
     TotalOperationsCount  = 0;
     CurrentOpeartionCount = 0;
     InitializeComponent();
     formProgressBar                             = this;
     backgroundWorker.DoWork                    += backgroundWorker_DoWork;
     backgroundWorker.ProgressChanged           += backgroundWorker_ProgressChanged;
     backgroundWorker.RunWorkerCompleted        += backgroundWorker_RunWorkerCompleted;
     backgroundWorker.WorkerReportsProgress      = true;
     backgroundWorker.WorkerSupportsCancellation = true;
     backgroundWorker.RunWorkerAsync();
 }
Esempio n. 2
0
 /// <summary>
 /// Publishes the currently chosen version for QA. It does so by first
 /// making all the verifications needed for correct copying and then
 /// copying all the files and directories to the given QA folder.
 /// </summary>
 public static void Publish()
 {
     //Subsequent checks before beginning the copy operation.
     //Ordered in this way for readability.
     if (NotEmpty())
     {
         if (PathsAreLegal())
         {
             if (HasBinDebug())
             {
                 if (DirectoriesExist())
                 {
                     if (HasNetworkAccess())
                     {
                         FormProgressBar formProgressBar = new FormProgressBar();
                         formProgressBar.ShowDialog();
                     }
                 }
             }
         }
     }
 }