private static bool Authentication() { string filePath = Application.StartupPath + "\\lnc.key"; if (!System.IO.File.Exists(filePath)) { using (FXFW.License.LicenseKeyFrm dlg = new FXFW.License.LicenseKeyFrm(Application.ProductName)) { dlg.ShowDialog(); } } if (!System.IO.File.Exists(filePath)) { return(false); } else { System.IO.StreamReader sr = new System.IO.StreamReader(filePath); string Key = sr.ReadToEnd(); sr.Close(); if (FXFW.License.LicenseKeyFrm.CompareBios(Key, Application.ProductName)) { return(true); } else { System.IO.File.Delete(filePath); Application.Restart(); Application.Exit(); return(false); } } }
private static bool Authentication() { string filePath = Application.StartupPath + "\\lnc.key"; if (!System.IO.File.Exists(filePath)) { using (FXFW.License.LicenseKeyFrm dlg = new FXFW.License.LicenseKeyFrm(Application.ProductName)) { dlg.ShowDialog(); } } if (!System.IO.File.Exists(filePath)) return false; else { System.IO.StreamReader sr = new System.IO.StreamReader(filePath); string Key = sr.ReadToEnd(); sr.Close(); if (FXFW.License.LicenseKeyFrm.Compare(Key, Application.ProductName)) return true; else { System.IO.File.Delete(filePath); Application.Restart(); Application.Exit(); return false; } } }