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,2 +1,2 @@
[Codes]
DaysCode=85A52AA9BB5EEE6C5D13
DaysCode=1CFD160ECF31269CB526

View File

@ -1,27 +1,33 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="7"/>
<Version Value="12"/>
<General>
<Flags>
<AlwaysBuild Value="False"/>
<LRSInOutputDirectory Value="False"/>
<CompatibilityMode Value="True"/>
</Flags>
<MainUnit Value="0"/>
<TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="1"/>
<Scaled Value="True"/>
<UseXPManifest Value="True"/>
</General>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<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>
@ -37,11 +43,11 @@
<Unit0>
<Filename Value="exdys30.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Exdys30"/>
<CursorPos X="8" Y="2"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="212"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit0>
<Unit1>
<Filename Value="exdys30u.pas"/>
@ -50,23 +56,24 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Exdys30u"/>
<CursorPos X="37" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="108"/>
<CursorPos Y="108"/>
<UsageCount Value="212"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../../source/onguard.pas"/>
<UnitName Value="onguard"/>
<CursorPos X="1" Y="1407"/>
<TopLine Value="1392"/>
<CursorPos Y="1407"/>
<UsageCount Value="106"/>
</Unit2>
<Unit3>
<Filename Value="../../../../../../temp/fpc/rtl/i386/i386.inc"/>
<CursorPos X="1" Y="1462"/>
<TopLine Value="1447"/>
<CursorPos Y="1462"/>
<UsageCount Value="10"/>
</Unit3>
<Unit4>
@ -74,50 +81,46 @@
<ComponentName Value="OgAboutForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="qogabout0"/>
<CursorPos X="42" Y="184"/>
<TopLine Value="179"/>
<CursorPos X="42" Y="184"/>
<UsageCount Value="10"/>
</Unit4>
<Unit5>
<Filename Value="../../../../../../lazarus/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit5>
<Unit6>
<Filename Value="../../source/ogutil.pas"/>
<UnitName Value="ogutil"/>
<CursorPos X="3" Y="71"/>
<TopLine Value="56"/>
<CursorPos X="3" Y="71"/>
<UsageCount Value="10"/>
</Unit6>
</Units>
<JumpHistory Count="8" HistoryIndex="7">
<JumpHistory Count="9" HistoryIndex="8">
<Position1>
<Filename Value="exdys30u.pas"/>
<Caret Line="130" Column="1" TopLine="115"/>
<Caret Line="130" TopLine="115"/>
</Position1>
<Position2>
<Filename Value="exdys30u.pas"/>
<Caret Line="132" Column="1" TopLine="117"/>
<Caret Line="132" TopLine="117"/>
</Position2>
<Position3>
<Filename Value="exdys30u.pas"/>
<Caret Line="133" Column="1" TopLine="118"/>
<Caret Line="133" TopLine="118"/>
</Position3>
<Position4>
<Filename Value="exdys30u.pas"/>
<Caret Line="134" Column="1" TopLine="119"/>
<Caret Line="134" TopLine="119"/>
</Position4>
<Position5>
<Filename Value="exdys30u.pas"/>
<Caret Line="151" Column="1" TopLine="127"/>
<Caret Line="151" TopLine="127"/>
</Position5>
<Position6>
<Filename Value="exdys30u.pas"/>
<Caret Line="113" Column="1" TopLine="98"/>
<Caret Line="113" TopLine="98"/>
</Position6>
<Position7>
<Filename Value="exdys30u.pas"/>
@ -127,13 +130,18 @@
<Filename Value="exdys30u.pas"/>
<Caret Line="36" Column="30" TopLine="30"/>
</Position8>
<Position9>
<Filename Value="exdys30u.pas"/>
<Caret Line="16" Column="19"/>
</Position9>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Version Value="11"/>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
@ -145,42 +153,46 @@
</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="6">
<BreakPoints Count="4">
<Item1>
<Source Value="exdys30u.pas"/>
<Line Value="125"/>
</Item1>
<Item2>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../source/onguard.pas"/>
<Line Value="1360"/>
</Item2>
<Item3>
<Source Value="exdys30u.pas"/>
<Line Value="108"/>
</Item3>
<Item4>
</Item1>
<Item2>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../source/qogabout0.pas"/>
<Line Value="102"/>
</Item4>
<Item5>
</Item2>
<Item3>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../source/qogabout0.pas"/>
<Line Value="97"/>
</Item5>
<Item6>
</Item3>
<Item4>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsGlobal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../source/onguard.pas"/>
<Line Value="1970"/>
</Item6>
</Item4>
</BreakPoints>
<Exceptions Count="2">
<Item1>

View File

@ -7,7 +7,11 @@ uses
Exdys30u in 'EXDYS30U.PAS' {Form1}, tponguard;
{$R *.res}
begin
Application.Scaled:=True;
Application.Title:='';
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;

View File

@ -6,48 +6,57 @@ object Form1: TForm1
Caption = 'Form1'
ClientHeight = 158
ClientWidth = 229
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.27'
LCLVersion = '2.3.0.0'
object Label1: TLabel
Left = 64
Height = 14
Top = 74
Width = 84
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Memo1
AnchorSideTop.Side = asrBottom
Left = 69
Height = 15
Top = 66
Width = 91
Alignment = taCenter
BorderSpacing.Top = 24
Caption = 'Days Remaining: '
ParentColor = False
end
object Memo1: TMemo
Left = 6
Height = 45
Top = 14
Width = 213
Lines.Strings = (
'If you can edit this, then your program '
'was allowed to run'
)
ScrollBars = ssVertical
object CloseBtn: TBitBtn
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
Left = 70
Height = 33
Top = 105
Width = 89
BorderSpacing.Top = 24
BorderSpacing.Bottom = 12
Kind = bkClose
TabOrder = 0
end
object CloseBtn: TBitBtn
Left = 64
Height = 33
Top = 92
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 = 205
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 12
Caption = 'If you can edit this, then your program was allowed to run'
WordWrap = True
end
object OgDaysCode1: TOgDaysCode
OnChecked = OgDaysCode1Checked
OnGetKey = OgDaysCode1GetKey
OnGetCode = OgDaysCode1GetCode
OnChangeCode = OgDaysCode1ChangeCode
left = 88
top = 130
Left = 40
Top = 88
end
end

View File

@ -1,19 +1,25 @@
{ 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'D'#1#6'Height'#3#158#0#3'Top'#3#4#1#5'Wid'
+'th'#3#229#0#7'Caption'#6#5'Form1'#12'ClientHeight'#3#158#0#11'ClientWidth'#3
+#229#0#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#245#9'Font.Name'#6#13'M'
+'S Sans Serif'#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'
+#10'LCLVersion'#6#6'0.9.27'#0#6'TLabel'#6'Label1'#4'Left'#2'@'#6'Height'#2#14
+#3'Top'#2'J'#5'Width'#2'T'#9'Alignment'#7#8'taCenter'#7'Caption'#6#16'Days R'
+'emaining: '#11'ParentColor'#8#0#0#5'TMemo'#5'Memo1'#4'Left'#2#6#6'Height'#2
+'-'#3'Top'#2#14#5'Width'#3#213#0#13'Lines.Strings'#1#6'(If you can edit this'
+', then your program '#6#18'was allowed to run'#0#10'ScrollBars'#7#10'ssVert'
+'ical'#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'CloseBtn'#4'Left'#2'@'#6'Height'#2'!'
+#3'Top'#2'\'#5'Width'#2'Y'#4'Kind'#7#7'bkClose'#9'NumGlyphs'#2#0#8'TabOrder'
+#2#1#0#0#11'TOgDaysCode'#11'OgDaysCode1'#9'OnChecked'#7#18'OgDaysCode1Checke'
+'d'#8'OnGetKey'#7#17'OgDaysCode1GetKey'#9'OnGetCode'#7#18'OgDaysCode1GetCode'
+#12'OnChangeCode'#7#21'OgDaysCode1ChangeCode'#4'left'#2'X'#3'top'#3#130#0#0#0
+#0
+#229#0#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#10'LCLV'
+'ersion'#6#7'2.3.0.0'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'O'
+'wner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#5
+'Memo1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'E'#6'Height'#2#15#3
+'Top'#2'B'#5'Width'#2'['#9'Alignment'#7#8'taCenter'#17'BorderSpacing.Top'#2
+#24#7'Caption'#6#16'Days Remaining: '#11'ParentColor'#8#0#0#7'TBitBtn'#8'Clo'
+'seBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'as'
+'rCenter'#21'AnchorSideTop.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'a'
+'srBottom'#4'Left'#2'F'#6'Height'#2'!'#3'Top'#2'i'#5'Width'#2'Y'#17'BorderSp'
+'acing.Top'#2#24#20'BorderSpacing.Bottom'#2#12#4'Kind'#7#7'bkClose'#8'TabOrd'
+'er'#2#0#0#0#6'TLabel'#5'Memo1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anc'
+'horSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'An'
+'chorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2#30#3'Top'#2#12#5
+'Width'#3#205#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'BorderSpaci'
+'ng.Around'#2#12#7'Caption'#6':If you can edit this, then your program was a'
+'llowed to run'#8'WordWrap'#9#0#0#11'TOgDaysCode'#11'OgDaysCode1'#9'OnChecke'
+'d'#7#18'OgDaysCode1Checked'#8'OnGetKey'#7#17'OgDaysCode1GetKey'#9'OnGetCode'
+#7#18'OgDaysCode1GetCode'#12'OnChangeCode'#7#21'OgDaysCode1ChangeCode'#4'Lef'
+'t'#2'('#3'Top'#2'X'#0#0#0
]);

View File

@ -13,8 +13,8 @@ interface
uses
SysUtils, Classes, Controls,
Forms, Dialogs,LResources, StdCtrls, Buttons,
OnGuard,OgUtil,IniFiles;
Forms, Dialogs, LResources, StdCtrls, Buttons,
OnGuard, OgUtil, IniFiles;
const
CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8,
@ -25,8 +25,8 @@ type
{ TForm1 }
TForm1 = class(TForm)
Memo1: TMemo;
CloseBtn: TBitBtn;
Memo1: TLabel;
OgDaysCode1: TOgDaysCode;
Label1: TLabel;
procedure FormCreate(Sender: TObject);