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