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); } }
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); } }