public static string code() { Hardware hd = new Hardware(); string _cpuInfo = hd.GetCpuInfo(); string _diskInfo = hd.GetDiskID(); string _createNo = EncAndDec.toDigital(EncAndDec.Encode(_cpuInfo + _diskInfo)); return _createNo; }
public static bool isReg() { bool r = false; INIClass _ini = new INIClass("config.ini"); if (_ini.ExistINIFile()) { Hardware hd = new Hardware(); string _cpuInfo = hd.GetCpuInfo(); string _diskInfo = hd.GetDiskID(); string _createNo = EncAndDec.toDigital(EncAndDec.Encode(_cpuInfo + _diskInfo)); string _reg = _ini.IniReadValue("Security", "Serial number"); if(_reg!=null&&_reg!="") { if(_reg.Equals(EncAndDec.toDigitalKey(_createNo))) { r = true; } } } return r; }
private string GetSourceNo() { Hardware hd = new Hardware(); string _cpuInfo = hd.GetCpuInfo(); string _diskInfo = hd.GetDiskID(); return EncAndDec.Encode(_cpuInfo + _diskInfo); }