Пример #1
0
    /// <summary>
    /// Adds trial license keys to DB. No license is added when running in web application gallery mode.
    /// </summary>
    private bool AddTrialLicenseKeys()
    {
        // Skip creation of trial license keys if running in WWAG mode
        if (ValidationHelper.GetBoolean(Service.Resolve <IAppSettingsService>()[WWAG_KEY], false))
        {
            return(false);
        }

        string licenseKey = ValidationHelper.GetString(Service.Resolve <IAppSettingsService>()["CMSTrialKey"], String.Empty);

        if (licenseKey != String.Empty)
        {
            return(LicenseHelper.AddTrialLicenseKeys(licenseKey, true, false));
        }

        pnlError.ErrorLabelText = ResHelper.GetFileString("Install.ErrorTrialLicense");

        return(false);
    }