Example #1
0
 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;
 }
Example #2
0
        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;
        }
Example #3
0
 private string GetSourceNo()
 {
     Hardware hd = new Hardware();
     string _cpuInfo = hd.GetCpuInfo();
     string _diskInfo = hd.GetDiskID();
     return EncAndDec.Encode(_cpuInfo + _diskInfo);
 }