DeadByDaylightBackup/View/MainWindow.xaml.cs
/// <summary>
/// Show a popup with a message
/// </summary>
/// <param name="message">the message to show</param>
/// <param name="ex"> exception infomration</param>
Show a popup with a message
Show a popup with a message
internal void ShowPopup(string message, Exception ex = null)
        {
            try
            {
                if (ex == null)
                    MessageBox.Show(this, message, message, MessageBoxButton.OK, MessageBoxImage.Exclamation);
                else
                    MessageBox.Show(this, ex.ToString(), message, MessageBoxButton.OK, MessageBoxImage.Error);
            }
            catch (Exception exception)
            {
                _logger.Log(LogLevel.Fatal, exception, "Failed to show popup for exception! Message was {0}", message);
            }
        }
internal void ShowPopup ( string message , Exception ex = null ) { try { if ( ex == null ) MessageBox . Show ( this , message , message , MessageBoxButton . OK , MessageBoxImage . Exclamation ) ; else MessageBox . Show ( this , ex . ToString ( ) , message , MessageBoxButton . OK , MessageBoxImage . Error ) ; } catch ( Exception exception ) { _logger . Log ( LogLevel . Fatal , exception , " " , message ) ; } }
Show a popup with a message
Show a popup with a message
message
string
the message to show
the message to show
ex
Exception
None