protected void ApplyLicenseCommand(ProductLicenseCommand command) { ProductLicenseCommand oldCommand = null; if (LicenseServices.LicenseInformation.HasLicenseOverrideCommand) { oldCommand = LicenseServices.LicenseInformation.LicenseOverrideCommand; } LicenseServices.RegisterLicenseOverrideCommand(command); LicenseEnforcer.ApplyLicense(command.NotifyUser && LicenseEnforcer.CountNagged == 0); // nag user if he hasn't already been nagged }
protected virtual ProductRights ApplyLicenseCommand(ProductRights rights, ProductLicenseCommand licenseCommand) { switch (LicenseServices.LicenseInformation.LicenseOverrideCommand.Action) { case ProductLicenseAction.Enable: //rights.FeatureRights = ProductFeatureRights.Full; // If the command is to enable, then we simply remove the override command and let the license rights apply. // This behaviour prohibits enabling of an expired license (user will need new license) rights.FeatureRights = rights.FeatureRights; break; case ProductLicenseAction.DisableSoftware: rights.FeatureRights = ProductFeatureRights.None; break; case ProductLicenseAction.CrippleSoftware: rights.FeatureRights = ProductFeatureRights.Partial; break; } return(rights); }
public void RegisterLicenseOverrideCommand(ProductLicenseCommand command) { LicenseServices.RegisterLicenseOverrideCommand(command); }
public void SetLicenseOverrideCommand(ProductLicenseCommand value) { _settings.LicenseOverrideCommand = value; _settings.Save(); }
public void RegisterLicenseOverrideCommand(ProductLicenseCommand command) { LicenseKeyProvider.SetLicenseOverrideCommand(command); Apply(); }