Exemple #1
0
 private void SetRunFinished()
 {
     TaskbarInformation.ProgressState = WasCanceled ? TaskbarItemProgressState.Error : TaskbarItemProgressState.Indeterminate;
     Task.Run(async() =>
     {
         await Task.Delay(3000);
         await Dispatcher.BeginInvoke(new Action(() =>
         {
             TaskbarInformation.ProgressState = TaskbarItemProgressState.None;
         }));
     });
     IsFinished = true;
     ContinueButton.IsEnabled = true;
     CancelButton.IsEnabled   = false;
     if (WasCanceled)
     {
         StatusLabel.Text = "Run Canceled";
     }
     else
     {
         StatusLabel.Text = "Run Complete";
     }
     ProgressBar.Finished = true;
     ContinueButton.FlashAnimation(5);
     OpenDirectoryButton.FlashAnimation(5);
 }