static void ShowDetailsDialog(string title, string message, string details) { if (System.Windows.Application.Current.Dispatcher.CheckAccess()) { var dialog = new DetailsDialog(title, message, details, false); dialog.ShowModal(); } else { Debug.Assert(false); Trace.WriteLine("Can not show error dialog on current thread. " + $"{Environment.NewLine}Error dialog message: {message}" + $"{Environment.NewLine}Error dialog details: {details}"); } }
static bool ShowDetailsNoMoreDisplayDialog(string title, string message, string[] settingPath) { if (System.Windows.Application.Current.Dispatcher.CheckAccess()) { var dialog = new DetailsDialog(title, message, null, true, settingPath); dialog.ShowModal(); return(dialog.DialogResult == true); } else { Debug.Assert(false); Trace.WriteLine("Can not show error dialog on current thread. " + $"{Environment.NewLine}Error dialog message: {message}"); return(true); } }