public static void ShowException(Exception ex) { var messageBox = new ErrorMessageBox(ex); messageBox.WindowStartupLocation = WindowStartupLocation.CenterScreen; messageBox.ShowDialog(); }
public static void Try(Action proc) { try { proc(); } catch (Exception ex) { ErrorMessageBox.ShowException(ex); } }