QQ: 282397369
配置界面
软件还没开做,先搞个注册,不注册不让用。
注册也就是授权。基于使用来说,授权分两个层面:目标计算机可以运行本程序、可以运行指定脚本。
从设计概念来说,脚本对应于一个业务,或模块。
所以先设计配置界面
目标计算机授权
获取本机序列号
通过绑定MAC地址、硬盘序列号等措施,计算得到本机序列号,用户不可修改。
LabeledEdit_Computer_SN->Text = THelper::Register::GetApplicationGuidCode
(GuidCharacteristicCode);
申请注册
申请注册,将本机相应信息发送到目标QQ群,由维护人员手工注册,生成相应注册码。
LabeledEdit_Computer_SN->Text = THelper::Register::GetApplicationGuidCode
(GuidCharacteristicCode);
UnicodeString progress =
THelper::Register::ResponseNode->AttributeValueByName("progress");
THelper::String::ReplaceStringInStr(progress, L";", L"\n");
THelper::TqqController::ReportDebug
(THelper::FormatString(L"请授权本机使用脚本程序:\n本机序列号:%s\n%s",
LabeledEdit_Computer_SN->Text, progress));
录入相应注册码后,进行比对,匹配则为已注册
业务模块授权
不同业务模块,对应于不同的脚本。同样策略,可以针对指定模块进行注册申请与授权操作。
int index = ListBox_Module->ItemIndex;
if (index == -1)
return;
TScriptModuleConfig * config =
(TScriptModuleConfig*)(ListBox_Module->Items->Objects[index]);
LabeledEdit_Computer_SN->Text = THelper::Register::GetApplicationGuidCode
(GuidCharacteristicCode);
UnicodeString progress =
THelper::Register::ResponseNode->AttributeValueByName("progress");
THelper::String::ReplaceStringInStr(progress, L";", L"\n");
UnicodeString moduleName = config->Name;
THelper::TqqController::ReportDebug
(THelper::FormatString(L"请授权本机使用目标模块:\n本机序列号:%s\n模块名称:%s\n%s",
LabeledEdit_Computer_SN->Text, moduleName, progress));
录入授权注册码后,检查比对匹配结果。
开始做收费的美梦。