示例#1
0
        public void NotifyEvaluationLicenseUsed(Type licensedComponentType, object instance, string licenseKey)
        {
            if (EvaluationLicenseUsed != null)
            {
                EvaluationLicenseUsedEventArgs e = new EvaluationLicenseUsedEventArgs(licensedComponentType, instance);
                EvaluationLicenseUsed(this, e);
            }
            else
            {
                StringBuilder sb = new StringBuilder();

                string caption = "Evaluation License Notice";

                sb.AppendFormat("The product {0} is being used with an evaluation license, which ", this.ProductName);
                sb.AppendFormat("does not grant you the rights of a full license.\n", this.ProductName);
                sb.AppendFormat("[licensed class: {0}.]\n", licensedComponentType);
                sb.AppendFormat("\n");
                sb.AppendFormat("Use the contact information below to obtain a fully licensed version ");
                sb.AppendFormat("of this product from the vendor.\n");
                sb.AppendFormat("\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);
            }
        }
示例#2
0
        public void NotifyEvaluationLicenseUsed(Type licensedComponentType, object instance, string licenseKey)
        {
            if ( EvaluationLicenseUsed != null )
            {
                EvaluationLicenseUsedEventArgs e = new EvaluationLicenseUsedEventArgs(licensedComponentType, instance);
                EvaluationLicenseUsed(this, e);
            }
            else
            {
                StringBuilder sb = new StringBuilder();

                string caption = "Evaluation License Notice";

                sb.AppendFormat( "The product {0} is being used with an evaluation license, which ", this.ProductName );
                sb.AppendFormat( "does not grant you the rights of a full license.\n", this.ProductName);
                sb.AppendFormat( "[licensed class: {0}.]\n", licensedComponentType );
                sb.AppendFormat( "\n" );
                sb.AppendFormat( "Use the contact information below to obtain a fully licensed version " );
                sb.AppendFormat( "of this product from the vendor.\n" );
                sb.AppendFormat( "\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 );
            }
        }