public bool CheckPlatformIsAuthorize() { PlatformAuthorizeHelper helper = new PlatformAuthorizeHelper(); bool isAuthorize = helper.CheckPlatformIsAuthorize();//如果授权码可用 return(isAuthorize); }
/// <summary> /// 传入平台识别码,和授权码,并核对平台识别码是否合法,并且授权码是否可用,则写入授权码到服务器根目录文件。 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool AuthorizePlat(AuthorizeVM model) { var isAuthorize = false; PlatformAuthorizeHelper helper = new PlatformAuthorizeHelper(); var MachineCode = helper.GetMachineCode(); if (MachineCode == model.MachineCode) { isAuthorize = helper.CheckPlatformIsAuthorize(model.AuthorizeCode);//如果授权码可用 if (isAuthorize) { helper.WriteAuthorizeToConfig(model.AuthorizeCode); } } return(isAuthorize); }