OnGuard: Replace in all demo projects .lrs resource by .res resource. Less hints and warnings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8724 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-02-20 17:36:51 +00:00
parent 91b3ac7ce0
commit e456d87021
100 changed files with 824 additions and 2317 deletions

View File

@ -3,8 +3,8 @@ unit NAFMGR1;
interface
uses
IniFiles, SysUtils, Dialogs, StdCtrls, Controls, Classes, Forms,
Buttons, LResources, ExtCtrls,onguard, ognetwrk, ogutil;
SysUtils, Dialogs, StdCtrls, Controls, Classes, Forms, Buttons, ExtCtrls,
onguard, ognetwrk, ogutil;
type
@ -55,7 +55,10 @@ var
implementation
{$R *.lfm}
uses
IniFiles;
const
{this applications' key}
@ -135,6 +138,7 @@ function TNafFrm.UpdateInfoLabels(const FileName: string): Boolean;
var
NetAccessInfo: TNetAccessInfo;
begin
NetAccessInfo := Default(TNetAccessInfo);
if GetNetAccessFileInfo(FileName, Key, NetAccessInfo) then begin
TotalSlotsLb.Caption := IntToStr(NetAccessInfo.Total);
LockedSlotsLb.Caption := IntToStr(NetAccessInfo.Locked);
@ -150,6 +154,7 @@ var
begin
Result := -1;
if (Length(Str) = SizeOf(Code) * 2) then begin
Code := Default(TCode);
HexToBuffer(Str, Code, SizeOf(Code));
Result := DecodeNAFCountCode(Key, Code);
end;
@ -162,13 +167,11 @@ begin
OgMakeCodes1.SetKey(CKey);
OgMakeCodes1.CodeType := ctNetWork;
if OgMakeCodes1.Execute then begin
Work := Default(TCode);
OgMakeCodes1.GetCode(Work);
AccessCodeEd.Text := BufferToHex(Work, SizeOf(Work));
end;
end;
initialization
{$i nafmgr1.lrs}
end.