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:
wp_xxyyzz
2023-02-20 11:17:45 +00:00
parent a1792b0941
commit d6279b614d
103 changed files with 2214 additions and 1689 deletions

View File

@ -9,7 +9,7 @@ interface
uses
SysUtils,Classes,Controls,
Forms, Dialogs, StdCtrls, Buttons,LResources, OnGuard,
Forms, Dialogs, StdCtrls, Buttons,LResources, ExtCtrls, OnGuard,
OgUtil,
IniFiles;
@ -22,12 +22,13 @@ type
{ TForm1 }
TForm1 = class(TForm)
Bevel1: TBevel;
CloseBtn: TBitBtn;
Memo1: TLabel;
Info: TLabel;
OgDateCode1: TOgDateCode;
Label1: TLabel;
lblExpires: TLabel;
procedure FormActivate(Sender: TObject);
procedure Memo1DblClick(Sender: TObject);
procedure InfoDblClick(Sender: TObject);
procedure OgDateCode1GetKey(Sender: TObject; var Key: TKey);
procedure OgDateCode1GetCode(Sender: TObject; var Code: TCode);
procedure OgDateCode1Checked(Sender: TObject; Status: TCodeStatus);
@ -56,7 +57,7 @@ begin
if FExpired then Application.Terminate;
end;
procedure TForm1.Memo1DblClick(Sender: TObject);
procedure TForm1.InfoDblClick(Sender: TObject);
begin
ShowMessage(Inttostr(OgDateCode1.GetInvalidCount));
end;
@ -107,7 +108,7 @@ begin
// Status := ogValidCode; // -- just for testing the form
case Status of
ogValidCode : begin
Label1.Caption := 'Expires: ' + DateToStr(OgDateCode1.GetValue);
lblExpires.Caption := 'Expires: ' + DateToStr(OgDateCode1.GetValue);
Exit;
end;