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} %");
 }
Exemple #2
0
 public void SetValue_DoesNotThrow()
 {
     Utils.MethodStart();
     foreach (var progressBar in _progressBars)
     {
         foreach (var value in EnumValues.GetProgress())
         {
             Assert.DoesNotThrow(() => InvokeProgressBar.SetValue(progressBar, value));
             Assert.DoesNotThrowAsync(async() => await Task.Run(() => InvokeProgressBar.SetValue(progressBar, value)));
         }
     }
     Utils.MethodComplete();
 }