public void SetProgressBarValue(ProgressBarCode code, int value)
 {
     if (code == ProgressBarCode.All)
     {
         AllProgressBar.Dispatcher.Invoke(() => AllProgressBar.Value = value, DispatcherPriority.Background);
     }
     else if (code == ProgressBarCode.File)
     {
         FileProgressBar.Dispatcher.Invoke(() => FileProgressBar.Value = value, DispatcherPriority.Background);
     }
 }
 public void SetProgressBarMaximum(ProgressBarCode code, int maximum, int currentValue)
 {
     if (code == ProgressBarCode.All)
     {
         AllProgressBar.Dispatcher.Invoke(() => { AllProgressBar.Maximum = maximum; AllProgressBar.Value = currentValue; }, DispatcherPriority.Background);
     }
     else if (code == ProgressBarCode.File)
     {
         FileProgressBar.Dispatcher.Invoke(() => { FileProgressBar.Maximum = maximum; AllProgressBar.Value = currentValue; }, DispatcherPriority.Background);
     }
 }