public void NotifyLicenseCheckFailed(LicenseCheckFailureReason reason, Type licensedComponentType, object instance, string licenseKey) { //Trace.WriteLine( "NotifyLicenseCheckFailed" ); if (LicenseCheckFailed != null) { LicenseCheckFailedEventArgs e = new LicenseCheckFailedEventArgs(reason, licensedComponentType, instance); LicenseCheckFailed(this, e); } else { StringBuilder sb = new StringBuilder(); string caption = "License Check Failed"; sb.AppendFormat("The product {0} requires a valid license, but one could not be obtained.\n", this.ProductName); sb.AppendFormat("[licensed class: {0}. Failure reason: {1}]\n", licensedComponentType, reason); sb.AppendFormat("\n"); sb.AppendFormat("Use the contact information below to obtain a valid license from the vendor.\n"); sb.AppendFormat(" Vendor : {0}\n", this.VendorName); sb.AppendFormat(" Product: {0}\n", this.ProductName); sb.AppendFormat(" Contact: {0}\n", this.ContactUrl); if (licenseKey != null && licenseKey.Length != 0) { sb.AppendFormat(" License Key: {0}\n", licenseKey); } sb.AppendFormat("\n"); sb.AppendFormat("[ Integrated licensing support by License Express (tm) from Wanderlust Software. http://www.wanderlust-software.com ]"); System.Windows.Forms.MessageBox.Show(sb.ToString(), caption); } //Trace.WriteLine( "End NotifyLicenseCheckFailed" ); }
public void NotifyLicenseCheckFailed(LicenseCheckFailureReason reason, Type licensedComponentType, object instance, string licenseKey) { //Trace.WriteLine( "NotifyLicenseCheckFailed" ); if ( LicenseCheckFailed != null ) { LicenseCheckFailedEventArgs e = new LicenseCheckFailedEventArgs(reason, licensedComponentType, instance); LicenseCheckFailed(this, e); } else { StringBuilder sb = new StringBuilder(); string caption = "License Check Failed"; sb.AppendFormat( "The product {0} requires a valid license, but one could not be obtained.\n", this.ProductName); sb.AppendFormat( "[licensed class: {0}. Failure reason: {1}]\n", licensedComponentType, reason ); sb.AppendFormat( "\n" ); sb.AppendFormat( "Use the contact information below to obtain a valid license from the vendor.\n" ); sb.AppendFormat( " Vendor : {0}\n", this.VendorName ); sb.AppendFormat( " Product: {0}\n", this.ProductName ); sb.AppendFormat( " Contact: {0}\n", this.ContactUrl ); if ( licenseKey != null && licenseKey.Length != 0 ) { sb.AppendFormat( " License Key: {0}\n", licenseKey ); } sb.AppendFormat( "\n" ); sb.AppendFormat( "[ Integrated licensing support by License Express (tm) from Wanderlust Software. http://www.wanderlust-software.com ]"); System.Windows.Forms.MessageBox.Show( sb.ToString(), caption ); } //Trace.WriteLine( "End NotifyLicenseCheckFailed" ); }