Esempio n. 1
0
 /// <summary>
 /// 验证注册码是否正确
 /// </summary>
 /// <param name=""></param>
 public bool DoValidateLic(string content)
 {
     try
     {
         RegisterHelper helper      = new RegisterHelper();
         LicData        data        = helper.Dectry(content);
         string         machineCode = new MachineCodeTools().GenerateMachineCode();
         return((data.LastTime > DateTime.Now) && (data.MachineCode == machineCode));
     }
     catch
     {
         return(false);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 生成注册码
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public string DoGenerateLic(LicData data)
        {
            RegisterHelper helper = new RegisterHelper();

            return(helper.Entry(data));
        }