示例#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);
     }
 }
        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);
            }
        }
 public void CreateLicense()
 {
     LicenseProvider licenseProvider = new LicenseProvider();
     string licese = licenseProvider.GetLicenseValueByInfo(_clientInfo);
     File.WriteAllText(FullPathLicense, licese);
 }