You've already forked lazarus-ccr
OnGuard: Rework sample projects.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8721 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -94,34 +94,36 @@ var
|
||||
ReleaseCode : TCode;
|
||||
CodeString : string;
|
||||
begin
|
||||
ReleaseCode := Default(TCode);
|
||||
edtReleaseCode.Text := '';
|
||||
|
||||
// Get the key that will be used to generate the ReleaseCode
|
||||
Key := ApplicationKey;
|
||||
if chkMachMod.Checked then
|
||||
try
|
||||
Modifier := StrToInt(edtMachineMod.Text);
|
||||
ApplyModifierToKeyPrim(Modifier, Key, sizeof(Key));
|
||||
except
|
||||
begin
|
||||
if TryStrToInt(edtMachineMod.Text, Modifier) then
|
||||
ApplyModifierToKeyPrim(Modifier, Key, sizeof(Key))
|
||||
else
|
||||
begin
|
||||
MessageDlg('Invalid Machine Modifier. Please check your entry and try again.', mtError, [mbOK], 0);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
// Get the expiration date
|
||||
if chkExpires.Checked then
|
||||
try
|
||||
Expires := StrToDate(edtExpires.Text);
|
||||
except
|
||||
begin
|
||||
if not TryStrToDate(edtExpires.Text, Expires) then
|
||||
begin
|
||||
MessageDlg('Invalid Expiration Date. Please check your entry and try again.', mtError, [mbOK], 0);
|
||||
exit;
|
||||
end
|
||||
else
|
||||
end;
|
||||
end else
|
||||
Expires := 0;
|
||||
|
||||
// Get the serial number
|
||||
try
|
||||
SerialNum := StrToInt(edtSerialNumber.Text);
|
||||
except
|
||||
if not TryStrToInt(edtSerialNumber.Text, SerialNum) then
|
||||
begin
|
||||
MessageDlg('Invalid Serial Number. Please check your entry and try again.', mtError, [mbOK], 0);
|
||||
exit;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user