MailWindow: Fix MessageBox and ProgressBar
All checks were successful
Test / Run tests (push) Successful in 2m11s
All checks were successful
Test / Run tests (push) Successful in 2m11s
This commit is contained in:
@@ -690,7 +690,7 @@ namespace Elwig.Windows {
|
||||
PrintButton.IsEnabled = PrintDocument != null && !hasPreviewDocs;
|
||||
EmailButton.IsEnabled = EmailDocuments != null && !hasPreviewDocs && App.Config.Smtp != null;
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.ToString(), "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
} finally {
|
||||
UnlockInputs();
|
||||
GenerateButton.IsEnabled = true;
|
||||
@@ -742,6 +742,9 @@ namespace Elwig.Windows {
|
||||
Member = m,
|
||||
Docs = docs.SelectMany<SelectedDoc, GeneratedDoc>(doc => {
|
||||
try {
|
||||
App.MainDispatcher.Invoke(() => {
|
||||
ProgressBar.Value = offset + 100.0 * i / 2 / totalNum;
|
||||
});
|
||||
if (doc.Type == DocType.Custom) {
|
||||
return [new GeneratedDoc((string)doc.Details!)];
|
||||
} else if (doc.Type == DocType.MemberDataSheet) {
|
||||
|
||||
Reference in New Issue
Block a user