private void initLicense() { string createText = EasyMD5.Hash(mac() + "inactive"); FileInfo file = new FileInfo(path + "\\" + mac() + "\\" + fileName); file.Directory.Create(); File.WriteAllText(file.FullName, createText); }
public void updateLicense(string state) { string createText = EasyMD5.Hash(mac() + state); FileInfo file = new FileInfo(path + "\\" + mac() + "\\" + fileName); file.Directory.Create(); File.WriteAllText(file.FullName, createText); }
public bool isActiveLicense() { try { string readText = File.ReadAllText(path + "\\" + mac() + "\\" + fileName); string activeMode = EasyMD5.Hash(mac() + "active"); return(readText == activeMode); }catch (Exception) { } return(false); }