public void SupportsInt64s() { var pr = new ProgressBarReporter(new ProgressBar()); pr.Maximum = Int64.MaxValue / 3; pr.Progress = Int64.MaxValue / 6; Assert.AreEqual(pr.Bar.Maximum / 2, pr.Bar.Value); }
public void StyleIsPreserved() { var pr = new ProgressBarReporter(new ProgressBar { Style = ProgressBarStyle.Continuous }); pr.Progress = null; pr.Progress = 50; Assert.AreEqual(ProgressBarStyle.Continuous, pr.Bar.Style); }
public void ProgressBarIsUpdated() { var pr = new ProgressBarReporter(new ProgressBar()); pr.Progress = 50; Assert.AreEqual(50, pr.Bar.Value); Assert.AreEqual(100, pr.Bar.Maximum); }
bool allowCancel = true; //The UI in the designer reflects AllowCancellation == true. The ctor sets it to false #endregion Fields #region Constructors ///<summary>Creates a new ProgressForm instance.</summary> public ProgressForm() { InitializeComponent(); barReporter = new ProgressBarReporter(progressBar); cancelWidthDelta = cancelButton.Right - progressBar.Right; AllowCancellation = false; }
public void MarqueeWorks() { var pr = new ProgressBarReporter(new ProgressBar()); pr.Progress = null; Assert.AreEqual(ProgressBarStyle.Marquee, pr.Bar.Style); }