public bool AskUserForLicense(LicenseBuildType productBuildType, bool standAlone, string textMask, System.Windows.Forms.IWin32Window parent, ValidateProductKeyDelegate validateDelegate) { string productPath = this.Assembly.Location; Guid productId = this.Id; string productTitle = this.Name; bool rc = LicenseUtils.AskUserForLicense(productPath, standAlone, parent, productId, (int)productBuildType, productTitle, textMask, validateDelegate); return rc; }
/// <summary> /// Public constructor. /// </summary> public LicenseData(string productLicense, string serialNumber, string licenseTitle, LicenseBuildType buildType, int licenseCount, DateTime? expirationDate, Icon productIcon) { ProductLicense = productLicense; SerialNumber = serialNumber; LicenseTitle = licenseTitle; BuildType = buildType; LicenseCount = licenseCount; DateToExpire = expirationDate; ProductIcon = productIcon; }
/// <summary> /// Verifies that there is a valid product license for your plug-in, using /// the Rhino licensing system. If the plug-in is installed as a standalone /// node, the locally installed license will be validated. If the plug-in /// is installed as a network node, a loaner license will be requested by /// the system's assigned Zoo server. If the Zoo server finds and returns /// a license, then this license will be validated. If no license is found, /// then the user will be prompted to provide a license key, which will be /// validated. /// </summary> /// <param name="productBuildType"> /// The product build contentType required by your plug-in. /// </param> /// <param name="validateDelegate"> /// Since the Rhino licensing system knows nothing about your product license, /// you will need to validate the product license provided by the Rhino /// licensing system. This is done by supplying a callback function, or delegate, /// that can be called to perform the validation. /// </param> /// <returns> /// true if a valid license was found. false otherwise. /// </returns> public bool GetLicense(LicenseBuildType productBuildType, ValidateProductKeyDelegate validateDelegate) { string productPath = this.Assembly.Location; Guid productId = this.Id; string productTitle = this.Name; bool rc = LicenseUtils.GetLicense(productPath, productId, (int)productBuildType, productTitle, validateDelegate); return rc; }
/// <summary> /// Public constructor. /// </summary> public LicenseData(string productLicense, string serialNumber, string licenseTitle, LicenseBuildType buildType, int licenseCount) { ProductLicense = productLicense; SerialNumber = serialNumber; LicenseTitle = licenseTitle; BuildType = buildType; LicenseCount = licenseCount; DateToExpire = null; ProductIcon = null; }