/// <summary> /// Constructor. /// </summary> /// <param name="counter"> /// The progress counter which the control represents. /// </param> internal ProgressControl( ProgressCounter counter ) { InitializeComponent(); progressBar1.Maximum = counter.Maximum; progressBar1.Value = counter.Value; label1.Text = counter.ToString(); }
/// <summary> /// Adds a ProgressControl to the form /// </summary> /// <param name="counter"> /// The progress counter to represent on the control. /// </param> internal void AddControl( ProgressCounter counter ) { ProgressControl control = new ProgressControl( counter ); control.Name = counter.Narrative; control.Left = 0; control.Top = _topPosition; control.Width = this.Width; _topPosition += control.Height; this.Controls.Add( control ); }
/// <summary> /// Adds a ProgressControl to the form /// </summary> /// <param name="counter"> /// The progress counter to represent on the control. /// </param> internal void AddControl(ProgressCounter counter) { ProgressControl control = new ProgressControl(counter); control.Name = counter.Narrative; control.Left = 0; control.Top = _topPosition; control.Width = this.Width; _topPosition += control.Height; this.Controls.Add(control); }