private static string ErrorMessageFromResponse(ILicenseSubServiceResponse response) { if (response.Exception != null) { return(response.Exception.Message); } if ((int)response.ErrorCode != 0) { return(LicensingDialogHelper.ErrorMessageFromHResult(response.ErrorCode)); } return(string.Empty); }
internal static void ShowErrorMessageFromResponse(ILicenseSubServiceResponse response, IMessageDisplayService messageDisplayService) { string str = LicensingDialogHelper.ErrorMessageFromResponse(response); if (string.IsNullOrEmpty(str)) { return; } MessageBoxArgs args = new MessageBoxArgs() { Message = str, Button = MessageBoxButton.OK, Image = MessageBoxImage.Hand }; int num = (int)messageDisplayService.ShowMessage(args); }