mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-10-22 13:45:07 -04:00
Fix possible cross-threading errors with MessageBoxBase
This commit is contained in:
1 parent
4b7939541a
commit
7e79e98771
3 files changed
+36
-7
No files matched your search
@@ -399,7 +399,15 @@ public abstract class ProcessBookViewModelBase : ReactiveObject
|
||||
const MessageBoxButtons SkipDialogButtons = MessageBoxButtons.AbortRetryIgnore;
|
||||
const MessageBoxDefaultButton SkipDialogDefaultButton = MessageBoxDefaultButton.Button1;
|
||||
|
||||
return await MessageBoxBase.Show(skipDialogText, "Skip this book?", SkipDialogButtons, MessageBoxIcon.Question, SkipDialogDefaultButton);
|
||||
try
|
||||
{
|
||||
return await MessageBoxBase.Show(skipDialogText, "Skip this book?", SkipDialogButtons, MessageBoxIcon.Question, SkipDialogDefaultButton);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Serilog.Log.Logger.Error(ex, "Error showing retry dialog. Defaulting to 'Retry'; action.");
|
||||
return DialogResult.Retry;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user