public static bool ShowTrialExpiredDialog(IServices services, CommonDialogCreator trialExpiredDialogCreator) { bool flag = false; ILicensingDialogQuery getInstance = trialExpiredDialogCreator.GetInstance; if (LicensingDialogHelper.ShowDialogWithMainWindowDisabled(services, getInstance) && getInstance.IsLicensed) { flag = true; } return(flag); }
public static bool ShowActivationGraceExpiredDialog(IServices services, CommonDialogCreator activationGraceExpiredDialogCreator) { ILicensingDialogQuery getInstance = activationGraceExpiredDialogCreator.GetInstance; if (!LicensingDialogHelper.ShowDialogWithMainWindowDisabled(services, getInstance)) { return(false); } ILicenseService service = services.GetService <ILicenseService>(); Guid mostPermissiveSkuId = service.MostPermissiveSkuId; return(service.IsLicensed(mostPermissiveSkuId) || service.IsInGrace(mostPermissiveSkuId)); }
public static bool ShowLicensingDialog(IServices services, CommonDialogCreator licensingDialogCreator) { bool flag = false; ILicenseService service1 = services.GetService <ILicenseService>(); ILicensingDialogQuery getInstance = licensingDialogCreator.GetInstance; Guid mostPermissiveSkuId = service1.MostPermissiveSkuId; if (mostPermissiveSkuId != Guid.Empty) { if (service1.IsInGrace(mostPermissiveSkuId)) { getInstance.IsPermanentLicense = false; getInstance.GraceDaysRemaining = (uint)Math.Floor((double)service1.GetRemainingGraceMinutes(mostPermissiveSkuId) / 1440.0); } else { getInstance.IsStudioPermanentLicense = service1.FeaturesFromSku(service1.MostPermissiveSkuId).Contains(ExpressionFeatureMapper.StudioLicense); getInstance.IsPermanentLicense = !getInstance.IsStudioPermanentLicense && !service1.FeaturesFromSku(service1.MostPermissiveSkuId).Contains(ExpressionFeatureMapper.TrialLicense); } if (LicensingDialogHelper.ShowDialogWithMainWindowDisabled(services, getInstance) && getInstance.IsLicensed) { flag = true; } } else { MessageBoxArgs args = new MessageBoxArgs() { Message = StringTable.LicensingTrialKeyInstallationFailureMessage, Button = MessageBoxButton.OK, Image = MessageBoxImage.Hand }; IMessageDisplayService service2 = services.GetService <IMessageDisplayService>(); if (service2 != null) { int num = (int)service2.ShowMessage(args); } } return(flag); }
public static bool ShowActivationDialog(IServices services, CommonDialogCreator activationDialogCreator) { ILicensingDialogQuery getInstance = activationDialogCreator.GetInstance; return(LicensingDialogHelper.ShowDialogWithMainWindowDisabled(services, getInstance)); }