Exemplo n.º 1
0
 public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
 {
     if (context.UsageMode == LicenseUsageMode.Runtime)
     {
         return(UltamationLicenceProvider.RetrieveLicence(type));
     }
     return(null);
 }
Exemplo n.º 2
0
 public void Register()
 {
     this.Licence.ProductKey         = ProductKeyStr.Text;
     this.Licence.LicencedCompany    = CompanyStr.Text;
     this.Licence.LicencedIndividual = UserStr.Text;
     this.Licence.EMail           = EMailStr.Text;
     this.Licence.UniqueMachineID = this.Licence.BuildUniqueMachineId();
     this.Licence.Type            = UltamationLicence.UltamationLicenceType.Full;
     this.Licence.Expiry          = DateTime.Today.AddYears(100);
     UltamationLicenceProvider.StoreLicence(this.Licence);
     //Settings.Default.LicenceUsername = this.Username;
     //Settings.Default.LicenceCompany = this.Company;
     //Settings.Default.LicenceKey = this.Key;
     //Settings.Default.Save();
 }