Пример #1
0
 public void CreateLicense()
 {
     try
     {
         LicenseProvider licenseProvider = new LicenseProvider();
         string          licese          = licenseProvider.GetLicenseValueByInfo(_clientInfo);
         File.WriteAllText(FullPathLicense, licese);
     }
     catch (Exception ex)
     {
         App.SendException(ex);
     }
 }
Пример #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);
            }
        }
Пример #3
0
        public bool CheckLicense()
        {
            try
            {
                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));
                }
            }
            catch (Exception ex)
            {
                App.SendException(ex);
                return(false);
            }
        }
Пример #4
0
 public void CreateLicense()
 {
     LicenseProvider licenseProvider = new LicenseProvider();
     string licese = licenseProvider.GetLicenseValueByInfo(_clientInfo);
     File.WriteAllText(FullPathLicense, licese);
 }