コード例 #1
0
 /// <summary>
 ///     Show an information message with the <see cref="MessageBoxImage.Information"/> icon and the word "Information" as caption (correctly translated)
 /// </summary>
 /// <param name="window">The window the message should be displayed on</param>
 /// <param name="message">The message text.</param>
 public static void ShowInformation(this IWindowInteractionService window, string message)
 {
     window.ShowMessageBox(message, Tx.T("Information"), MessageBoxButton.OK, MessageBoxImage.Information,
                           MessageBoxResult.OK, MessageBoxOptions.None);
 }
コード例 #2
0
 /// <summary>
 ///     Show the <see cref="Exception.Message"/> in a message box  with the <see cref="MessageBoxImage.Error"/> icon and the word "Error" as caption (correctly translated)
 /// </summary>
 /// <param name="window">The window the errors should be displayed on</param>
 /// <param name="e"></param>
 public static void ShowErrorMessageBox(this IWindowInteractionService window, Exception e)
 {
     window.ShowMessageBox(e.Message, Tx.T("Error"), MessageBoxButton.OK, MessageBoxImage.Error,
                           MessageBoxResult.None, MessageBoxOptions.None);
 }