/// <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); } }
/// <summary> /// 生成注册码 /// </summary> /// <param name="data"></param> /// <returns></returns> public string DoGenerateLic(LicData data) { RegisterHelper helper = new RegisterHelper(); return(helper.Entry(data)); }