Пример #1
0
        private void NewInstallation()
        {
            _licenseInfo = new LicenceInfo();

            _licenseInfo.InstallDate = DateTime.UtcNow;
            _licenseInfo.TrialGuid = Guid.NewGuid();

            RecordTrialEvent("START");

            SaveLicenceInfo();
        }
Пример #2
0
        private void LoadLiceseInfo()
        {
            _licenseInfo = null;

            var strLicInfo = Properties.Settings.Default.LicenseInfo;

            if (!string.IsNullOrWhiteSpace(strLicInfo))
            {
                try
                {
                    _licenseInfo = Security.SecureStringToString(Security.DecryptString(strLicInfo)).FromJson<LicenceInfo>();
                }
                catch
                {
                    _licenseInfo = null;
                }
            }
        }