예제 #1
0
 private void StartProgress()
 {
     InvokeProgressBar.SetValue(progressBar, 0);
     InvokeControl.SetText(labelValue, $"{progressBar.Value} %");
     while (progressBar.Value < 100)
     {
         InvokeProgressBar.SetValue(progressBar, progressBar.Value + 1);
         InvokeControl.SetText(labelValue, $"{progressBar.Value} %");
         System.Threading.Thread.Sleep(100);
     }
     InvokeControl.SetText(labelValue, $"{progressBar.Value} %");
 }
예제 #2
0
 public void SetMaximum_DoesNotThrow()
 {
     Utils.MethodStart();
     foreach (var progressBar in _progressBars)
     {
         foreach (var value in EnumValues.GetProgress())
         {
             Assert.DoesNotThrow(() => InvokeProgressBar.SetMaximum(progressBar, value));
             Assert.DoesNotThrowAsync(async() => await Task.Run(() => InvokeProgressBar.SetMaximum(progressBar, value)));
         }
     }
     Utils.MethodComplete();
 }