Beispiel #1
0
        public void CreateLicense()
        {
            LicenseProvider licenseProvider = new LicenseProvider();
            string          licese          = licenseProvider.GetLicenseValueByInfo(_clientInfo);

            File.WriteAllText(FullPathLicense, licese);
        }
Beispiel #2
0
        public bool CheckLicense()
        {
            if (File.Exists(FullPathLicense) == false)
            {
                return(false);
            }

            using (StreamReader sr = new StreamReader(FullPathLicense))
            {
                LicenseProvider licenseProvider = new LicenseProvider();
                var             licese          = licenseProvider.GetLicenseValueByInfo(licenseProvider.GetLicenseValue());
                string          line            = sr.ReadToEnd();
                return(licese.Equals(line));
            }
        }