private static void ThreadSafeChangeProgressBarValue(ProgressBar pb, int value)
 {
     pb.UIThread(() => pb.Value = value);
 }