OnGuard: Fix sample projects not loading. Activate themes in sample projects. Anchored layout of sample forms.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8707 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-02-17 16:28:47 +00:00
parent 36eff03740
commit a9c3a3022c
152 changed files with 6033 additions and 3578 deletions

View File

@ -1,28 +1,34 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<Version Value="7"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
<CompatibilityMode Value="True"/>
</Flags>
<MainUnit Value="0"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="1"/>
<UseXPManifest Value="True"/>
</General>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<local>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
</Mode0>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
@ -38,11 +44,11 @@
<Unit0>
<Filename Value="exdtp21.lpr"/>
<IsPartOfProject Value="True"/>
<CursorPos X="44" Y="9"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UnitName Value="Exdtp21"/>
<CursorPos X="44" Y="11"/>
<UsageCount Value="837"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit0>
<Unit1>
<Filename Value="exdtp21u.pas"/>
@ -51,23 +57,24 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Exdtp21u"/>
<CursorPos X="63" Y="113"/>
<TopLine Value="72"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="87"/>
<CursorPos X="52" Y="107"/>
<UsageCount Value="836"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\..\source\onguard.pas"/>
<UnitName Value="onguard"/>
<CursorPos X="41" Y="1207"/>
<TopLine Value="1199"/>
<EditorIndex Value="2"/>
<TopLine Value="1199"/>
<CursorPos X="41" Y="1207"/>
<UsageCount Value="418"/>
<Loaded Value="True"/>
</Unit2>
</Units>
<JumpHistory Count="13" HistoryIndex="12">
<JumpHistory Count="15" HistoryIndex="14">
<Position1>
<Filename Value="exdtp21u.pas"/>
<Caret Line="83" Column="17" TopLine="69"/>
@ -102,32 +109,41 @@
</Position8>
<Position9>
<Filename Value="exdtp21.lpr"/>
<Caret Line="13" Column="40" TopLine="1"/>
<Caret Line="13" Column="40"/>
</Position9>
<Position10>
<Filename Value="exdtp21.lpr"/>
<Caret Line="9" Column="44" TopLine="1"/>
<Caret Line="9" Column="44"/>
</Position10>
<Position11>
<Filename Value="exdtp21u.pas"/>
<Caret Line="75" Column="1" TopLine="75"/>
<Caret Line="75" TopLine="75"/>
</Position11>
<Position12>
<Filename Value="exdtp21u.pas"/>
<Caret Line="106" Column="1" TopLine="91"/>
<Caret Line="106" TopLine="91"/>
</Position12>
<Position13>
<Filename Value="..\..\source\onguard.pas"/>
<Caret Line="1344" Column="8" TopLine="1323"/>
</Position13>
<Position14>
<Filename Value="exdtp21u.pas"/>
<Caret Line="98" Column="49" TopLine="73"/>
</Position14>
<Position15>
<Filename Value="exdtp21u.pas"/>
<Caret Line="97" Column="49" TopLine="72"/>
</Position15>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
@ -139,54 +155,67 @@
</Checks>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<BreakPoints Count="9">
<BreakPoints Count="7">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\..\source\qonguard3.pas"/>
<Line Value="135"/>
</Item1>
<Item2>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\..\source\qonguard3.pas"/>
<Line Value="143"/>
</Item2>
<Item3>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\..\source\qonguard3.pas"/>
<Line Value="159"/>
</Item3>
<Item4>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\..\source\qonguard3.pas"/>
<Line Value="186"/>
</Item4>
<Item5>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\..\source\qonguard3.pas"/>
<Line Value="212"/>
</Item5>
<Item6>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\..\source\qonguard3.pas"/>
<Line Value="235"/>
</Item6>
<Item7>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\..\source\qonguard3.pas"/>
<Line Value="130"/>
</Item7>
<Item8>
<Source Value="exdtp21u.pas"/>
<Line Value="75"/>
</Item8>
<Item9>
<Source Value="exdtp21u.pas"/>
<Line Value="106"/>
</Item9>
</BreakPoints>
<Exceptions Count="2">
<Item1>

View File

@ -6,7 +6,10 @@ uses
Forms,
Exdtp21u in 'exdtp21u.pas' {Form1}, tponguard;
{$R *.res}
begin
Application.Title:='';
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;

View File

@ -3,53 +3,59 @@ object Form1: TForm1
Height = 155
Top = 279
Width = 228
ActiveControl = Memo1
AutoSize = True
Caption = 'Form1'
ClientHeight = 155
ClientWidth = 228
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
OnActivate = FormActivate
Position = poScreenCenter
LCLVersion = '0.9.27'
LCLVersion = '2.3.0.0'
object Label1: TLabel
Left = 50
Height = 14
Top = 70
Width = 99
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Memo1
AnchorSideTop.Side = asrBottom
Left = 64
Height = 15
Top = 54
Width = 101
Caption = 'Expires: 00/00/0000'
ParentColor = False
end
object Memo1: TMemo
Left = 8
Height = 59
Top = 8
Width = 197
Lines.Strings = (
'If you can edit this, your program '
'was '
'allowed to run'
)
OnDblClick = Memo1DblClick
ScrollBars = ssVertical
object CloseBtn: TBitBtn
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
Left = 70
Height = 33
Top = 81
Width = 89
BorderSpacing.Around = 12
Kind = bkClose
TabOrder = 0
end
object CloseBtn: TBitBtn
Left = 56
Height = 33
Top = 89
Width = 89
Kind = bkClose
NumGlyphs = 0
TabOrder = 1
object Memo1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 12
Height = 30
Top = 12
Width = 204
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 12
Caption = 'If you can edit this, your program was allowed to run'
WordWrap = True
OnDblClick = Memo1DblClick
end
object OgDateCode1: TOgDateCode
OnChecked = OgDateCode1Checked
OnGetKey = OgDateCode1GetKey
OnGetCode = OgDateCode1GetCode
StoreCode = True
left = 158
top = 87
Left = 176
Top = 64
end
end

View File

@ -1,19 +1,24 @@
{ To jest automatycznie wygenerowany plik zasobów lazarusa }
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'b'#1#6'Height'#3#155#0#3'Top'#3#23#1#5'Wi'
+'dth'#3#228#0#13'ActiveControl'#7#5'Memo1'#7'Caption'#6#5'Form1'#12'ClientHe'
+'ight'#3#155#0#11'ClientWidth'#3#228#0#10'Font.Color'#7#7'clBlack'#11'Font.H'
+'eight'#2#245#9'Font.Name'#6#13'MS Sans Serif'#10'OnActivate'#7#12'FormActiv'
+'ate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.27'#0#6'TLabel'
+#6'Label1'#4'Left'#2'2'#6'Height'#2#14#3'Top'#2'F'#5'Width'#2'c'#7'Caption'#6
+#19'Expires: 00/00/0000'#11'ParentColor'#8#0#0#5'TMemo'#5'Memo1'#4'Left'#2#8
+#6'Height'#2';'#3'Top'#2#8#5'Width'#3#197#0#13'Lines.Strings'#1#6'#If you ca'
+'n edit this, your program '#6#4'was '#6#14'allowed to run'#0#10'OnDblClick'
+#7#13'Memo1DblClick'#10'ScrollBars'#7#10'ssVertical'#8'TabOrder'#2#0#0#0#7'T'
+'BitBtn'#8'CloseBtn'#4'Left'#2'8'#6'Height'#2'!'#3'Top'#2'Y'#5'Width'#2'Y'#4
+'Kind'#7#7'bkClose'#9'NumGlyphs'#2#0#8'TabOrder'#2#1#0#0#11'TOgDateCode'#11
+'OgDateCode1'#9'OnChecked'#7#18'OgDateCode1Checked'#8'OnGetKey'#7#17'OgDateC'
+'ode1GetKey'#9'OnGetCode'#7#18'OgDateCode1GetCode'#9'StoreCode'#9#4'left'#3
+#158#0#3'top'#2'W'#0#0#0
+'dth'#3#228#0#8'AutoSize'#9#7'Caption'#6#5'Form1'#12'ClientHeight'#3#155#0#11
+'ClientWidth'#3#228#0#10'OnActivate'#7#12'FormActivate'#8'Position'#7#14'poS'
+'creenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#6'Label1'#22'AnchorSid'
+'eLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorS'
+'ideTop.Control'#7#5'Memo1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2
+'@'#6'Height'#2#15#3'Top'#2'6'#5'Width'#2'e'#7'Caption'#6#19'Expires: 00/00/'
+'0000'#11'ParentColor'#8#0#0#7'TBitBtn'#8'CloseBtn'#22'AnchorSideLeft.Contro'
+'l'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Contr'
+'ol'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'F'#6'Height'
+#2'!'#3'Top'#2'Q'#5'Width'#2'Y'#20'BorderSpacing.Around'#2#12#4'Kind'#7#7'bk'
+'Close'#8'TabOrder'#2#0#0#0#6'TLabel'#5'Memo1'#22'AnchorSideLeft.Control'#7#5
+'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5
+'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2#30#3
+'Top'#2#12#5'Width'#3#204#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20
+'BorderSpacing.Around'#2#12#7'Caption'#6'5If you can edit this, your program'
+' was allowed to run'#8'WordWrap'#9#10'OnDblClick'#7#13'Memo1DblClick'#0#0#11
+'TOgDateCode'#11'OgDateCode1'#9'OnChecked'#7#18'OgDateCode1Checked'#8'OnGetK'
+'ey'#7#17'OgDateCode1GetKey'#9'OnGetCode'#7#18'OgDateCode1GetCode'#9'StoreCo'
+'de'#9#4'Left'#3#176#0#3'Top'#2'@'#0#0#0
]);

View File

@ -22,8 +22,8 @@ type
{ TForm1 }
TForm1 = class(TForm)
Memo1: TMemo;
CloseBtn: TBitBtn;
Memo1: TLabel;
OgDateCode1: TOgDateCode;
Label1: TLabel;
procedure FormActivate(Sender: TObject);
@ -104,11 +104,10 @@ var
S : string;
begin
FExpired := false;
ShortDateFormat := 'yyy-mm-dd';
// Status := ogValidCode; // -- just for testing the form
case Status of
ogValidCode : begin
Label1.Caption := 'Expires: '
+ DateToStr(OgDateCode1.GetValue);
Label1.Caption := 'Expires: ' + DateToStr(OgDateCode1.GetValue);
Exit;
end;