using LibationWinForms.Dialogs; using System; using System.Linq; namespace LibationWinForms { public static class MessageBoxAlertAdmin { /// /// Logs error. Displays a message box dialog with specified text and caption. /// /// The text to display in the message box. /// The text to display in the title bar of the message box. /// Exception to log /// One of the System.Windows.Forms.DialogResult values. public static System.Windows.Forms.DialogResult Show(string text, string caption, Exception exception) { Serilog.Log.Logger.Error(exception, "Alert admin error: {@DebugText}", new { text, caption }); using var form = new MessageBoxAlertAdminDialog(text, caption, exception); return form.ShowDialog(); } } }