コード例 #1
0
 /// <summary>
 /// Adds the progress counters in the supplied collection to the current
 /// collection.
 /// </summary>
 /// <param name="counters">The counters to add to the collection</param>
 internal void AddRange(ProgressCounterDictionary counters)
 {
     foreach (ProgressCounter pc in counters.Values)
     {
         Add(pc);
     }
 }
コード例 #2
0
 /// <summary>
 /// Updates the progress bars on the form with the supplied counters.
 /// </summary>
 /// <param name="counters">
 /// The counters to represent on the form with progress bars
 /// </param>
 internal void UpdateBars(ProgressCounterDictionary counters)
 {
     lock ( counters )
     {
         foreach (Control c in this.Controls)
         {
             if (c is ProgressControl)
             {
                 this.Controls.Remove(c);
             }
         }
         _topPosition = 0;
         foreach (ProgressCounter counter in counters.Values)
         {
             AddControl(counter);
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected LongRunningProcessObject()
 {
     _myCounters   = new ProgressCounterDictionary();
     _subProcesses = new Collection <LongRunningProcessObject>();
 }