コード例 #1
0
 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);
 }
コード例 #2
0
        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);
        }