You've already forked lazarus-ccr
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:
@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user