/// <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); } }
/// <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); } } }
/// <summary> /// Constructor. /// </summary> protected LongRunningProcessObject() { _myCounters = new ProgressCounterDictionary(); _subProcesses = new Collection <LongRunningProcessObject>(); }