/// <summary> /// Because you are the only exception. /// </summary> /// <param name="ex">The exception to pass into the dialog.</param> public static void Show(Exception ex) { // Run it though the dictionary, see if it can be made more user-friendlyKK ex = ExceptionDictionary.GetFriendlyException(ex); if (App.AssemblyStorage.AssemblySettings.HomeWindow != null) { App.AssemblyStorage.AssemblySettings.HomeWindow.ShowMask(); } ControlDialogs.Exception exceptionDialog = App.AssemblyStorage.AssemblySettings.HomeWindow != null ? new ControlDialogs.Exception(ex) { Owner = App.AssemblyStorage.AssemblySettings.HomeWindow, WindowStartupLocation = WindowStartupLocation.CenterOwner } : new ControlDialogs.Exception(ex); exceptionDialog.ShowDialog(); if (App.AssemblyStorage.AssemblySettings.HomeWindow != null) { App.AssemblyStorage.AssemblySettings.HomeWindow.HideMask(); } }
/// <summary> /// Show the exception error dialog window. /// </summary> /// <param name="ex">The exception to pass into the dialog.</param> public static void Show(Exception ex) { // Run it though the dictionary, see if it can be made more user-friendlyKK ex = ExceptionDictionary.GetFriendlyException(ex); Settings.homeWindow.ShowMask(); var exceptionDialog = new ControlDialogs.Exception(ex) { Owner = Settings.homeWindow, WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner }; exceptionDialog.ShowDialog(); Settings.homeWindow.HideMask(); }