public static void ShowLicensingDialogIfNecessary(IServiceProvider services) { if (LicensingHelper.needToShowDialog) { LicensingHelper.ShowLicensingDialog(services); } }
internal static LicenseState ProjectTypeLicense(ProjectLicenseGroup group, IServiceProvider services) { ILicenseService service = services.GetService <ILicenseService>(); switch (group) { case ProjectLicenseGroup.WpfSilverlight: { IList <Guid> guids = service.SkusFromFeature(ExpressionFeatureMapper.WpfFeature); IList <Guid> guids1 = service.SkusFromFeature(ExpressionFeatureMapper.SilverlightFeature); return(LicensingHelper.DetermineLicenseState(service, LicensingHelper.CombineLists(guids, guids1))); } case ProjectLicenseGroup.SilverlightMobile: { return(LicensingHelper.DetermineLicenseState(service, service.SkusFromFeature(ExpressionFeatureMapper.MobileFeature))); } case ProjectLicenseGroup.SketchFlow: { IList <Guid> list = service.SkusFromFeature(ExpressionFeatureMapper.HobbledSketchFlowFeature); list = list.Union <Guid>(service.SkusFromFeature(ExpressionFeatureMapper.SketchFlowFeature)).ToList <Guid>(); return(LicensingHelper.DetermineLicenseState(service, list)); } } return(LicenseState.FullLicense()); }
private void RefreshLicenseValuesInternal() { this.license = LicensingHelper.ProjectTypeLicense(this.licenseGroup, this.services); base.IsExpired = this.license.IsExpired; base.RequiresActivation = !this.license.FullyLicensed; base.IsActivatable = this.license.IsActivatable; if (!base.IsExpired) { base.IsTrial = this.license.IsTrial; if (!base.IsTrial) { base.IsLicensed = true; } else { base.DaysRemaining = this.license.DaysLeft; } } base.OnPropertyChanged("TrialStatus"); base.OnPropertyChanged("LicenseButtonCommand"); base.OnPropertyChanged("ButtonText"); base.OnPropertyChanged("ActionAvailable"); base.OnPropertyChanged("IsVisible"); }
public static LicenseState ProjectLicense(IProjectTemplate template, IServiceProvider services) { return(LicensingHelper.ProjectTypeLicense(LicensingHelper.GetLicenseGroup(template), services)); }
public static LicenseState IsProjectLicensed(IProjectStore projectStore, IServiceProvider services) { return(LicensingHelper.ProjectTypeLicense(LicensingHelper.GetLicenseGroup(projectStore), services)); }