diff --git a/components/onguard/examples/codegen/codegen.lpi b/components/onguard/examples/codegen/codegen.lpi index 2292b78d5..bbad514ff 100644 --- a/components/onguard/examples/codegen/codegen.lpi +++ b/components/onguard/examples/codegen/codegen.lpi @@ -56,9 +56,9 @@ - - + + @@ -124,9 +124,10 @@ + - - + + @@ -243,122 +244,126 @@ - + - + - - + - - - - - - - + + + + + + + + - + - + - - + + - - + + - + - + - + - - + + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - + - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/components/onguard/examples/codegen/codegenu.lrs b/components/onguard/examples/codegen/codegenu.lrs deleted file mode 100644 index 340482448..000000000 --- a/components/onguard/examples/codegen/codegenu.lrs +++ /dev/null @@ -1,47 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TCodeGenFrm','FORMDATA',[ - 'TPF0'#11'TCodeGenFrm'#10'CodeGenFrm'#4'Left'#3';'#1#6'Height'#2'j'#3'Top'#3 - +#230#0#5'Width'#3'%'#1#13'ActiveControl'#7#11'GenerateBtn'#8'AutoSize'#9#11 - +'BorderStyle'#7#8'bsDialog'#7'Caption'#6#22'Example Code Generator'#12'Clien' - +'tHeight'#2'j'#11'ClientWidth'#3'%'#1#10'Font.Color'#7#12'clWindowText'#10'F' - +'ont.Pitch'#7#10'fpVariable'#8'Position'#7#14'poScreenCenter'#8'ShowHint'#9 - +#10'LCLVersion'#6#7'2.3.0.0'#0#12'TSpeedButton'#6'CopySb'#22'AnchorSideLeft.' - +'Control'#7#6'CodeEd'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTo' - +'p.Control'#7#6'CodeEd'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#10#1 - +#6'Height'#2#22#4'Hint'#6#22'Copy code to clipboard'#3'Top'#2#29#5'Width'#2 - +#23#18'BorderSpacing.Left'#2#4#19'BorderSpacing.Right'#2#12#10'Glyph.Data'#10 - +'F'#1#0#0'B'#1#0#0'BMB'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#17#0#0#0#17#0#0#0#1#0 - +#4#0#0#0#0#0#204#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0 - +#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192 - +#192#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255 - +#255#255#0#136#136#136#136#136#136#136#136#128#0#0#0#136#136#136#136#136#136 - +#136#136#128#0#0#0#136#136#136#132'DDDD'#128#0#0#0#136#136#136#132#255#255 - +#255#244#128#0#0#0#136#136#136#132#240#0#0#244#128#0#0#0#128#0#0#4#255#255 - +#255#244#128#0#0#0#128#255#255#244#240#0#0#244#128#0#0#0#128#240#0#4#255#255 - +#255#244#128#0#0#0#128#255#255#244#240#15'DD'#128#0#0#0#128#240#0#4#255#255 - +'OH'#128#0#0#0#128#255#255#244#255#255'D'#136#128#0#0#0#128#240#15#4'DDH'#136 - +#128#0#0#0#128#255#255#15#8#136#136#136#128#0#0#0#128#255#255#0#136#136#136 - +#136#128#0#0#0#128#0#0#8#136#136#136#136#128#0#0#0#136#136#136#136#136#136 - +#136#136#128#0#0#0#136#136#136#136#136#136#136#136#128#0#0#0#7'OnClick'#7#11 - +'CopySbClick'#0#0#6'TLabel'#6'Label2'#22'AnchorSideLeft.Control'#7#5'Owner' - +#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#12#6'Height'#2#15#3'Top'#2#12 - +#5'Width'#2#28#18'BorderSpacing.Left'#2#12#17'BorderSpacing.Top'#2#12#7'Capt' - +'ion'#6#4'Code'#12'FocusControl'#7#6'CodeEd'#11'ParentColor'#8#0#0#7'TButton' - +#11'GenerateBtn'#22'AnchorSideLeft.Control'#7#6'CodeEd'#21'AnchorSideTop.Con' - +'trol'#7#6'CodeEd'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#12#6'Heig' - +'ht'#2#25#4'Hint'#6#30'Display code generation dialog'#3'Top'#2'@'#5'Width'#2 - +'i'#17'BorderSpacing.Top'#2#12#20'BorderSpacing.Bottom'#2#12#25'BorderSpacin' - +'g.InnerBorder'#2#4#7'Caption'#6#13'Generate Code'#7'OnClick'#7#16'GenerateB' - +'tnClick'#8'TabOrder'#2#0#0#0#5'TEdit'#6'CodeEd'#22'AnchorSideLeft.Control'#7 - +#6'Label2'#21'AnchorSideTop.Control'#7#6'Label2'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#4'Left'#2#12#6'Height'#2#23#3'Top'#2#29#5'Width'#3#250#0#17'Bord' - +'erSpacing.Top'#2#2#20'Constraints.MinWidth'#3#250#0#8'ReadOnly'#9#8'TabOrde' - +'r'#2#1#0#0#7'TBitBtn'#8'CloseBtn'#21'AnchorSideTop.Control'#7#11'GenerateBt' - +'n'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrB' - +'ottom'#4'Left'#3#206#0#6'Height'#2#25#3'Top'#2'@'#5'Width'#2'K'#7'Anchors' - +#11#5'akTop'#7'akRight'#0#19'BorderSpacing.Right'#2#12#20'BorderSpacing.Bott' - +'om'#2#12#4'Kind'#7#7'bkClose'#8'TabOrder'#2#2#0#0#12'TOgMakeCodes'#12'OgMak' - +'eCodes1'#11'KeyFileName'#6#11'ONGUARD.INI'#9'ShowHints'#9#4'Left'#2'h'#3'To' - +'p'#2#8#0#0#0 -]); diff --git a/components/onguard/examples/codegen/codegenu.pas b/components/onguard/examples/codegen/codegenu.pas index b394a4bdf..47ad30384 100644 --- a/components/onguard/examples/codegen/codegenu.pas +++ b/components/onguard/examples/codegen/codegenu.pas @@ -6,8 +6,8 @@ interface uses LCLIntf, - SysUtils, Classes, Forms, Dialogs, - Buttons,LResources,StdCtrls, onguard,ogutil; + SysUtils, Classes, Forms, Dialogs, Buttons, StdCtrls, + onguard, ogutil; type TCodeGenFrm = class(TForm) @@ -30,6 +30,7 @@ var implementation +{$R *.lfm} procedure TCodeGenFrm.CopySbClick(Sender: TObject); var @@ -53,15 +54,12 @@ begin OgMakeCodes1.SetKey(CKey); if OgMakeCodes1.Execute then begin {get the code} + Work := Default(TCode); OgMakeCodes1.GetCode(Work); {display the code} CodeEd.Text := OgUtil.BufferToHex(Work, SizeOf(Work)); end; - - end; -initialization - {$i CODEGENU.lrs} end. diff --git a/components/onguard/examples/exdmod/exdmod.lpi b/components/onguard/examples/exdmod/exdmod.lpi index 87d48fea7..75fbcf557 100644 --- a/components/onguard/examples/exdmod/exdmod.lpi +++ b/components/onguard/examples/exdmod/exdmod.lpi @@ -57,9 +57,10 @@ + - - + + @@ -71,10 +72,7 @@ - - - @@ -160,123 +158,123 @@ - + - + - + - + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - + + - + - - + + - - + + - + - + - + diff --git a/components/onguard/examples/exdmod/exdmodu1.lrs b/components/onguard/examples/exdmod/exdmodu1.lrs deleted file mode 100644 index ced73d8a5..000000000 --- a/components/onguard/examples/exdmod/exdmodu1.lrs +++ /dev/null @@ -1,26 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TfrmMain','FORMDATA',[ - 'TPF0'#8'TfrmMain'#7'frmMain'#4'Left'#3't'#1#6'Height'#3#186#0#3'Top'#3#223#0 - +#5'Width'#3#240#0#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#21 - +'Serial Number Example'#12'ClientHeight'#3#186#0#11'ClientWidth'#3#240#0#10 - +'Font.Color'#7#7'clBlack'#10'OnActivate'#7#12'FormActivate'#8'Position'#7#14 - +'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#6'Label1'#22'Anchor' - +'SideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'Anch' - +'orSideTop.Control'#7#5'Memo1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left' - +#2'b'#6'Height'#2#15#3'Top'#2'6'#5'Width'#2','#9'Alignment'#7#8'taCenter'#7 - +'Caption'#6#10'Serial #: '#11'ParentColor'#8#0#0#7'TBitBtn'#8'CloseBtn'#22'A' - +'nchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21 - +'AnchorSideTop.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4 - +'Left'#2'L'#6'Height'#2'!'#3'Top'#2'Q'#5'Width'#2'Y'#20'BorderSpacing.Around' - +#2#12#4'Kind'#7#7'bkClose'#8'TabOrder'#2#0#0#0#6'TLabel'#5'Memo1'#22'AnchorS' - +'ideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorS' - +'ideRight.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#216#0#7'Anchors'#11#5'akTop'#6'a' - +'kLeft'#7'akRight'#0#20'BorderSpacing.Around'#2#12#7'Caption'#6':If you can ' - +'edit this, then your program was allowed to run'#8'WordWrap'#9#0#0#19'TOgSe' - +'rialNumberCode'#19'OgSerialNumberCode1'#9'OnChecked'#7#26'OgSerialNumberCod' - +'e1Checked'#8'OnGetKey'#7#25'OgSerialNumberCode1GetKey'#9'OnGetCode'#7#26'Og' - +'SerialNumberCode1GetCode'#13'OnGetModifier'#7#30'OgSerialNumberCode1GetModi' - +'fier'#4'Left'#2'8'#3'Top'#2'@'#0#0#0 -]); diff --git a/components/onguard/examples/exdmod/exdmodu1.pas b/components/onguard/examples/exdmod/exdmodu1.pas index 6b39fa1f7..4c31dc523 100644 --- a/components/onguard/examples/exdmod/exdmodu1.pas +++ b/components/onguard/examples/exdmod/exdmodu1.pas @@ -45,18 +45,16 @@ type procedure FormActivate(Sender: TObject); procedure OgSerialNumberCode1GetKey(Sender: TObject; var Key: TKey); procedure OgSerialNumberCode1GetCode(Sender: TObject; var Code: TCode); - procedure OgSerialNumberCode1Checked(Sender: TObject; - Status: TCodeStatus); - procedure OgSerialNumberCode1GetModifier(Sender: TObject; - var Value: Longint); + procedure OgSerialNumberCode1Checked(Sender: TObject; Status: TCodeStatus); + procedure OgSerialNumberCode1GetModifier(Sender: TObject; var Value: Longint); private { Private declarations } FExpired : Boolean; public { Public declarations } - TheDir : string; - IniSNVal : longint; - IniFile : TIniFile; + TheDir : string; + IniSNVal : longint; + IniFile : TIniFile; function GetSNData(var S : string) : integer; end; @@ -66,10 +64,10 @@ var implementation -uses - LResources,Exdmodu2; +{$R *.lfm} -{=======================================================================} +uses + Exdmodu2; procedure TfrmMain.OgSerialNumberCode1GetKey(Sender: TObject; var Key: TKey); begin @@ -81,10 +79,6 @@ begin if FExpired then Application.Terminate; end; - -{=======================================================================} - - procedure TfrmMain.OgSerialNumberCode1GetModifier(Sender: TObject; var Value: Longint); begin @@ -92,9 +86,6 @@ begin Value := GenerateMachineModifierPrim; end; - -{=======================================================================} - procedure TfrmMain.OgSerialNumberCode1GetCode(Sender: TObject; var Code: TCode); var S1 : string; @@ -144,8 +135,6 @@ begin end; end; -{=======================================================================} - function TfrmMain.GetSNData(var S : string) : integer; {method used to ask for user input of serial number and release code} var @@ -198,10 +187,7 @@ begin end; end; -{=======================================================================} - -procedure TfrmMain.OgSerialNumberCode1Checked(Sender: TObject; - Status: TCodeStatus); +procedure TfrmMain.OgSerialNumberCode1Checked(Sender: TObject; Status: TCodeStatus); var LI : longint; S : string; @@ -238,13 +224,10 @@ begin ogCodeExpired : S := 'Evaluation period expired'; end; - ShowMessage(S); + FExpired := true; end; -initialization -{$i exdmodu1.lrs} - end. diff --git a/components/onguard/examples/exdmod/exdmodu2.lrs b/components/onguard/examples/exdmod/exdmodu2.lrs deleted file mode 100644 index 8f8e847a5..000000000 --- a/components/onguard/examples/exdmod/exdmodu2.lrs +++ /dev/null @@ -1,51 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TSNEntryDlg','FORMDATA',[ - 'TPF0'#11'TSNEntryDlg'#10'SNEntryDlg'#4'Left'#3#150#1#6'Height'#3#195#0#3'Top' - +#3'x'#1#5'Width'#3#247#0#13'ActiveControl'#7#6'SNText'#8'AutoSize'#9#11'Bord' - +'erStyle'#7#8'bsDialog'#7'Caption'#6#23'Serial Number w/Modifer'#12'ClientHe' - +'ight'#3#195#0#11'ClientWidth'#3#247#0#10'Font.Color'#7#7'clBlack'#8'OnCreat' - +'e'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3' - +'.0.0'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anchor' - +'SideTop.Control'#7#6'SNText'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2 - +#8#6'Height'#2#15#3'Top'#2'B'#5'Width'#2#15#18'BorderSpacing.Left'#2#8#7'Cap' - +'tion'#6#2'SN'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#22'AnchorSideLeft.C' - +'ontrol'#7#5'Owner'#21'AnchorSideTop.Control'#7#8'CodeText'#18'AnchorSideTop' - +'.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#15#3'Top'#2'a'#5'Width'#2#28 - +#18'BorderSpacing.Left'#2#8#7'Caption'#6#4'Code'#11'ParentColor'#8#0#0#6'TLa' - +'bel'#6'Label3'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side' - +#7#9'asrCenter'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2'"'#6'Height'#2 - +#15#3'Top'#2#8#5'Width'#3#178#0#17'BorderSpacing.Top'#2#8#7'Caption'#6'!Call' - +' your Vendor NOW to register!'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#22 - +'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'ModString' - +#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#15#3'Top'#2'#' - +#5'Width'#2'-'#18'BorderSpacing.Left'#2#8#7'Caption'#6#8'Modifier'#11'Parent' - +'Color'#8#0#0#5'TEdit'#6'SNText'#22'AnchorSideLeft.Control'#7#9'ModString'#21 - +'AnchorSideTop.Control'#7#9'ModString'#18'AnchorSideTop.Side'#7#9'asrBottom' - +#4'Left'#2'='#6'Height'#2#23#3'Top'#2'>'#5'Width'#2'y'#17'BorderSpacing.Top' - +#2#8#8'TabOrder'#2#1#0#0#5'TEdit'#8'CodeText'#22'AnchorSideLeft.Control'#7#6 - +'SNText'#21'AnchorSideTop.Control'#7#6'SNText'#18'AnchorSideTop.Side'#7#9'as' - +'rBottom'#4'Left'#2'='#6'Height'#2#23#3'Top'#2']'#5'Width'#3#175#0#17'Border' - +'Spacing.Top'#2#8#19'BorderSpacing.Right'#2#8#8'TabOrder'#2#2#0#0#7'TBitBtn' - +#5'OKBtn'#21'AnchorSideTop.Control'#7#9'CancelBtn'#23'AnchorSideRight.Contro' - +'l'#7#6'Bevel1'#4'Left'#2'E'#6'Height'#2#26#3'Top'#3#143#0#5'Width'#2'.'#7'A' - +'nchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#20'BorderSpacing.Bottom'#2#8 - +#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#8'TabOrder'#2#3#0#0#7'TBitBtn'#9'Canc' - +'elBtn'#22'AnchorSideLeft.Control'#7#6'Bevel1'#19'AnchorSideLeft.Side'#7#9'a' - +'srBottom'#21'AnchorSideTop.Control'#7#6'Bevel2'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#4'Left'#3#131#0#6'Height'#2#26#3'Top'#3#143#0#5'Width'#2'.'#8'Au' - +'toSize'#9#17'BorderSpacing.Top'#2#12#20'BorderSpacing.Bottom'#2#8#4'Kind'#7 - +#8'bkCancel'#7'OnClick'#7#14'CancelBtnClick'#8'TabOrder'#2#4#0#0#5'TEdit'#9 - +'ModString'#22'AnchorSideLeft.Control'#7#6'Label4'#19'AnchorSideLeft.Side'#7 - +#9'asrBottom'#21'AnchorSideTop.Control'#7#6'Label3'#18'AnchorSideTop.Side'#7 - +#9'asrBottom'#4'Left'#2'='#6'Height'#2#23#3'Top'#2#31#5'Width'#2'y'#18'Borde' - +'rSpacing.Left'#2#8#17'BorderSpacing.Top'#2#8#8'ReadOnly'#9#7'TabStop'#8#8'T' - +'abOrder'#2#0#0#0#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#5'Owner' - +#19'AnchorSideLeft.Side'#7#9'asrCenter'#4'Left'#2's'#6'Height'#2#28#3'Top'#3 - +#136#0#5'Width'#2#16#5'Shape'#7#8'bsSpacer'#0#0#6'TBevel'#6'Bevel2'#22'Ancho' - +'rSideLeft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7#8'CodeText'#18'A' - +'nchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#8'CodeText' - +#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#3#3'Top'#3 - +#128#0#5'Width'#3#228#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'Bor' - +'derSpacing.Top'#2#12#5'Shape'#7#9'bsTopLine'#0#0#0 -]); diff --git a/components/onguard/examples/exdmod/exdmodu2.pas b/components/onguard/examples/exdmod/exdmodu2.pas index 2ea5cc159..795e8c8ea 100644 --- a/components/onguard/examples/exdmod/exdmodu2.pas +++ b/components/onguard/examples/exdmod/exdmodu2.pas @@ -3,8 +3,7 @@ unit Exdmodu2; interface uses - SysUtils,Classes,Controls, - Forms, Dialogs, StdCtrls, Buttons,LResources, ExtCtrls; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls; type @@ -35,12 +34,10 @@ var implementation - +{$R *.lfm} uses - OnGuard, - OgUtil; - + OnGuard, OgUtil; procedure TSNEntryDlg.CancelBtnClick(Sender: TObject); begin @@ -55,8 +52,5 @@ begin ModString.Text := BufferToHex(LI, SizeOf(longint)); end; -initialization -{$i exdmodu2.lrs} - end. diff --git a/components/onguard/examples/exdtp21/exdtp21.lpi b/components/onguard/examples/exdtp21/exdtp21.lpi index 62bda3545..3a947ce77 100644 --- a/components/onguard/examples/exdtp21/exdtp21.lpi +++ b/components/onguard/examples/exdtp21/exdtp21.lpi @@ -59,8 +59,8 @@ - - + + @@ -74,7 +74,7 @@ - + @@ -139,6 +139,10 @@ + + + + diff --git a/components/onguard/examples/exdtp21/exdtp21u.lfm b/components/onguard/examples/exdtp21/exdtp21u.lfm index 84ee4c785..1c8c51169 100644 --- a/components/onguard/examples/exdtp21/exdtp21u.lfm +++ b/components/onguard/examples/exdtp21/exdtp21u.lfm @@ -71,7 +71,7 @@ object Form1: TForm1 OnGetKey = OgDateCode1GetKey OnGetCode = OgDateCode1GetCode StoreCode = True - Left = 176 - Top = 64 + Left = 168 + Top = 72 end end diff --git a/components/onguard/examples/exdtp21/exdtp21u.lrs b/components/onguard/examples/exdtp21/exdtp21u.lrs deleted file mode 100644 index 870996580..000000000 --- a/components/onguard/examples/exdtp21/exdtp21u.lrs +++ /dev/null @@ -1,30 +0,0 @@ -{ 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#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#5'For' - +'m1'#12'ClientHeight'#3#155#0#11'ClientWidth'#3#228#0#10'OnActivate'#7#12'Fo' - +'rmActivate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6 - +'TLabel'#10'lblExpires'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideL' - +'eft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#4'Info'#18'AnchorSideT' - +'op.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.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9 - +'asrCenter'#21'AnchorSideTop.Control'#7#6'Bevel1'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#4'Left'#2'['#6'Height'#2#26#3'Top'#2'`'#5'Width'#2'.'#8'AutoSize' - +#9#20'BorderSpacing.Around'#2#12#4'Kind'#7#7'bkClose'#8'TabOrder'#2#0#0#0#6 - +'TLabel'#4'Info'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Cont' - +'rol'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.S' - +'ide'#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'Word' - +'Wrap'#9#10'OnDblClick'#7#12'InfoDblClick'#0#0#6'TBevel'#6'Bevel1'#22'Anchor' - +'SideLeft.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#10'lblExpires'#18'A' - +'nchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#4'Info'#20 - +'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2#3#3'Top'#2'Q' - +#5'Width'#3#204#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpa' - +'cing.Top'#2#12#5'Shape'#7#9'bsTopLine'#0#0#11'TOgDateCode'#11'OgDateCode1'#9 - +'OnChecked'#7#18'OgDateCode1Checked'#8'OnGetKey'#7#17'OgDateCode1GetKey'#9'O' - +'nGetCode'#7#18'OgDateCode1GetCode'#9'StoreCode'#9#4'Left'#3#176#0#3'Top'#2 - +'@'#0#0#0 -]); diff --git a/components/onguard/examples/exdtp21/exdtp21u.pas b/components/onguard/examples/exdtp21/exdtp21u.pas index ab563f01a..3cdb98bd8 100644 --- a/components/onguard/examples/exdtp21/exdtp21u.pas +++ b/components/onguard/examples/exdtp21/exdtp21u.pas @@ -8,10 +8,8 @@ unit Exdtp21u; interface uses - SysUtils,Classes,Controls, - Forms, Dialogs, StdCtrls, Buttons,LResources, ExtCtrls, OnGuard, - OgUtil, - IniFiles; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil; const CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8, @@ -43,9 +41,10 @@ var implementation +{$R *.lfm} - -{==========================================================================} +uses + IniFiles; procedure TForm1.OgDateCode1GetKey(Sender: TObject; var Key: TKey); begin @@ -59,17 +58,14 @@ end; procedure TForm1.InfoDblClick(Sender: TObject); begin - ShowMessage(Inttostr(OgDateCode1.GetInvalidCount)); + ShowMessage(Inttostr(OgDateCode1.GetInvalidCount)); end; -{==========================================================================} - procedure TForm1.OgDateCode1GetCode(Sender: TObject; var Code: TCode); var IniFile : TIniFile; S : string; - SD, - ED : TDateTime; + SD, ED : TDateTime; L : integer; begin {force the INI file to be in the same directory as the application} @@ -98,8 +94,6 @@ begin end; end; -{==========================================================================} - procedure TForm1.OgDateCode1Checked(Sender: TObject; Status: TCodeStatus); var S : string; @@ -120,7 +114,5 @@ begin FExpired := true; end; -initialization -{$i exdtp21u.lrs} end. diff --git a/components/onguard/examples/exdtreg/exdtreg.lpi b/components/onguard/examples/exdtreg/exdtreg.lpi index 5182bd279..20a45b501 100644 --- a/components/onguard/examples/exdtreg/exdtreg.lpi +++ b/components/onguard/examples/exdtreg/exdtreg.lpi @@ -61,8 +61,8 @@ - - + + @@ -87,123 +87,123 @@ - + - + - + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + diff --git a/components/onguard/examples/exdtreg/exdtregu.lrs b/components/onguard/examples/exdtreg/exdtregu.lrs deleted file mode 100644 index 33eb864cb..000000000 --- a/components/onguard/examples/exdtreg/exdtregu.lrs +++ /dev/null @@ -1,54 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#252#0#6'Height'#3'5'#1#3'Top'#3#138#0#5'W' - +'idth'#3#228#1#18'HorzScrollBar.Page'#3#227#1#18'VertScrollBar.Page'#3'4'#1#8 - +'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#17'Date Code Example' - +#12'ClientHeight'#3'5'#1#11'ClientWidth'#3#228#1#8'Position'#7#14'poScreenCe' - +'nter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#9'StatusLbl'#22'AnchorSideLef' - +'t.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#8'CloseBtn'#18'AnchorSideT' - +'op.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#15#3'Top'#3#249#0#5'Width' - +#2' '#7'Caption'#6#6'Status'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TL' - +'abel'#6'Label1'#22'AnchorSideLeft.Control'#7#7'CodeBtn'#19'AnchorSideLeft.S' - +'ide'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop' - +'.Side'#7#9'asrCenter'#4'Left'#3#181#0#6'Height'#2#15#3'Top'#2#17#5'Width'#2 - +'H'#18'BorderSpacing.Left'#2'P'#7'Caption'#6#13'Current code:'#5'Color'#7#6 - +'clNone'#11'ParentColor'#8#0#0#6'TLabel'#7'CodeLbl'#22'AnchorSideLeft.Contro' - +'l'#7#6'Label1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Cont' - +'rol'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#9#1#6'Hei' - +'ght'#2#15#3'Top'#2#17#5'Width'#2'`'#18'BorderSpacing.Left'#2#12#7'Caption'#6 - +#16'0000000000000000'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#7'TButton'#7 - +'CodeBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5 - +'Owner'#4'Left'#2#12#6'Height'#2#25#3'Top'#2#12#5'Width'#2'Y'#20'BorderSpaci' - +'ng.Around'#2#12#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#10'Enter Cod' - +'e'#7'OnClick'#7#12'CodeBtnClick'#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'CloseBtn' - +#21'AnchorSideTop.Control'#7#6'Bevel1'#18'AnchorSideTop.Side'#7#9'asrBottom' - +#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBott' - +'om'#4'Left'#3#144#1#6'Height'#2#25#3'Top'#3#244#0#5'Width'#2'K'#7'Anchors' - +#11#5'akTop'#0#17'BorderSpacing.Top'#2#12#19'BorderSpacing.Right'#2#12#20'Bo' - +'rderSpacing.Bottom'#2#12#4'Kind'#7#7'bkClose'#8'TabOrder'#2#1#0#0#7'TButton' - +#9'RemoveBtn'#21'AnchorSideTop.Control'#7#8'CloseBtn'#23'AnchorSideRight.Con' - +'trol'#7#8'CloseBtn'#4'Left'#3'+'#1#6'Height'#2#25#3'Top'#3#244#0#5'Width'#2 - +'a'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpacing.Right'#2#4#25'Borde' - +'rSpacing.InnerBorder'#2#4#7'Caption'#6#11'Remove Code'#7'OnClick'#7#14'Remo' - +'veBtnClick'#8'TabOrder'#2#2#0#0#6'TLabel'#4'Info'#22'AnchorSideLeft.Control' - +#7#5'Owner'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7 - +#9'asrBottom'#4'Left'#2#12#6'Height'#3#165#0#3'Top'#2'1'#5'Width'#3#204#1#7 - +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'BorderSpacing.Around'#2#12#7 - +'Caption'#12'H'#2#0#0'The label at the bottom of this form indicates the sta' - +'tus of the code. An invalid code indicates that the code is either the inco' - +'rrect type or that none has been entered. '#13#10#13#10'If the proper code ' - +'has not been entered or the ONGUARD.INI file was deleted, the message will ' - +'say that the code is invalid.'#13#10#13#10'Use the "Enter Code" button to e' - +'nter a code (the CODEGEN program can be used to generate the proper "Date" ' - +'code). '#13#10#13#10'The "Remove Code" button can be used to remove the ent' - +'ered code from the INI file. Doing so will cause the TOgDateCode component ' - +'to report that the code is invalid.'#5'Color'#7#9'clBtnFace'#11'ParentColor' - +#8#8'WordWrap'#9#0#0#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#4'Info' - +#23'AnchorSideRight.Control'#7#4'Info'#20'AnchorSideRight.Side'#7#9'asrBotto' - +'m'#4'Left'#2#12#6'Height'#2#3#3'Top'#3#229#0#5'Width'#3#204#1#7'Anchors'#11 - +#5'akTop'#6'akLeft'#7'akRight'#0#5'Shape'#7#9'bsTopLine'#0#0#11'TOgDateCode' - +#11'OgDateCode1'#9'OnChecked'#7#11'CodeChecked'#8'OnGetKey'#7#6'GetKey'#9'On' - +'GetCode'#7#7'GetCode'#4'Left'#3#168#0#3'Top'#3#192#0#0#0#0 -]); diff --git a/components/onguard/examples/exdtreg/exdtregu.pas b/components/onguard/examples/exdtreg/exdtregu.pas index 1187b4295..b13e3c008 100644 --- a/components/onguard/examples/exdtreg/exdtregu.pas +++ b/components/onguard/examples/exdtreg/exdtregu.pas @@ -3,8 +3,8 @@ unit ExDTRegU; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Buttons,LResources, ExtCtrls, OnGuard, IniFiles, OgUtil; + SysUtils, Classes,Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil; type @@ -36,6 +36,10 @@ var implementation +{$R *.lfm} + +uses + IniFiles; procedure TForm1.CodeChecked(Sender: TObject; Status: TCodeStatus); var @@ -93,6 +97,7 @@ begin Ini := TIniFile.Create('ONGUARD.INI'); try {store the date code in the ini file if it looks OK} + Work := Default(TCode); if HexToBuffer(S, Work, SizeOf(Work)) then begin {save the value} Ini.WriteString('Codes', 'DateCode', S); @@ -122,8 +127,4 @@ begin OgDateCode1.CheckCode(True); end; - -initialization -{$i exdtregu.lrs} - end. diff --git a/components/onguard/examples/exdyreg/ONGUARD.INI b/components/onguard/examples/exdyreg/ONGUARD.INI index 0d1de52c9..54a53159e 100644 --- a/components/onguard/examples/exdyreg/ONGUARD.INI +++ b/components/onguard/examples/exdyreg/ONGUARD.INI @@ -1,2 +1,2 @@ [Codes] -DaysCode=247291A99900D64CB826 +DaysCode=B6DA5EECDE3C13ECB826 diff --git a/components/onguard/examples/exdyreg/exdyreg.lpi b/components/onguard/examples/exdyreg/exdyreg.lpi index cdeb6369b..b130834e2 100644 --- a/components/onguard/examples/exdyreg/exdyreg.lpi +++ b/components/onguard/examples/exdyreg/exdyreg.lpi @@ -56,8 +56,8 @@ - - + + @@ -103,7 +103,7 @@ - + @@ -148,6 +148,14 @@ + + + + + + + + @@ -178,21 +186,14 @@ - + - - - - - - - - + diff --git a/components/onguard/examples/exdyreg/exdyregu.lrs b/components/onguard/examples/exdyreg/exdyregu.lrs deleted file mode 100644 index dbd213237..000000000 --- a/components/onguard/examples/exdyreg/exdyregu.lrs +++ /dev/null @@ -1,56 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#252#0#6'Height'#3'/'#1#3'Top'#3#138#0#5'W' - +'idth'#3#237#1#18'HorzScrollBar.Page'#3#236#1#18'VertScrollBar.Page'#3'.'#1#8 - +'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#17'Days Code Example' - +#12'ClientHeight'#3'/'#1#11'ClientWidth'#3#237#1#8'Position'#7#14'poScreenCe' - +'nter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#9'StatusLbl'#22'AnchorSideLef' - +'t.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#8'CloseBtn'#18'AnchorSideT' - +'op.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#15#3'Top'#3#246#0#5'Width' - +#2' '#7'Caption'#6#6'Status'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TL' - +'abel'#6'Label1'#22'AnchorSideLeft.Control'#7#7'CodeBtn'#19'AnchorSideLeft.S' - +'ide'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop' - +'.Side'#7#9'asrCenter'#4'Left'#3#181#0#6'Height'#2#15#3'Top'#2#17#5'Width'#2 - +'H'#18'BorderSpacing.Left'#2'P'#7'Caption'#6#13'Current code:'#5'Color'#7#6 - +'clNone'#11'ParentColor'#8#0#0#6'TLabel'#7'CodeLbl'#22'AnchorSideLeft.Contro' - +'l'#7#6'Label1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Cont' - +'rol'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#9#1#6'Hei' - +'ght'#2#15#3'Top'#2#17#5'Width'#2'`'#18'BorderSpacing.Left'#2#12#7'Caption'#6 - +#16'0000000000000000'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#7'TButton'#7 - +'CodeBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5 - +'Owner'#4'Left'#2#12#6'Height'#2#25#3'Top'#2#12#5'Width'#2'Y'#20'BorderSpaci' - +'ng.Around'#2#12#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#10'Enter Cod' - +'e'#7'OnClick'#7#12'CodeBtnClick'#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'CloseBtn' - +#21'AnchorSideTop.Control'#7#6'Bevel1'#18'AnchorSideTop.Side'#7#9'asrBottom' - +#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBott' - +'om'#4'Left'#3#144#1#6'Height'#2#25#3'Top'#3#241#0#5'Width'#2'Q'#7'Anchors' - +#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#12#19'BorderSpac' - +'ing.Right'#2#12#20'BorderSpacing.Bottom'#2#12#4'Kind'#7#7'bkClose'#8'TabOrd' - +'er'#2#1#0#0#7'TButton'#9'RemoveBtn'#21'AnchorSideTop.Control'#7#8'CloseBtn' - +#23'AnchorSideRight.Control'#7#8'CloseBtn'#4'Left'#3'+'#1#6'Height'#2#25#3'T' - +'op'#3#241#0#5'Width'#2'a'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpac' - +'ing.Right'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#11'Remove Cod' - +'e'#7'OnClick'#7#14'RemoveBtnClick'#8'TabOrder'#2#2#0#0#6'TLabel'#4'Info'#22 - +'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18 - +'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20 - +'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#3#165#0#3'Top'#2 - +'1'#5'Width'#3#213#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'Border' - +'Spacing.Around'#2#12#7'Caption'#12'H'#2#0#0'The label at the bottom of this' - +' form indicates the status of the code. An invalid code indicates that the ' - +'code is either the incorrect type or that none has been entered. '#13#10#13 - +#10'If the proper code has not been entered or the ONGUARD.INI file was dele' - +'ted, the message will say that the code is invalid.'#13#10#13#10'Use the "E' - +'nter Code" button to enter a code (the CODEGEN program can be used to gener' - +'ate the proper "Days" code). '#13#10#13#10'The "Remove Code" button can be ' - +'used to remove the entered code from the INI file. Doing so will cause the ' - +'TOgDaysCode component to report that the code is invalid.'#5'Color'#7#9'clB' - +'tnFace'#11'ParentColor'#8#8'WordWrap'#9#0#0#6'TBevel'#6'Bevel1'#22'AnchorSi' - +'deLeft.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#4'Info'#18'AnchorSide' - +'Top.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#4'Info'#20'AnchorSid' - +'eRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2#3#3'Top'#3#226#0#5'Wid' - +'th'#3#213#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#5'Shape'#7#9'bsTo' - +'pLine'#0#0#11'TOgDaysCode'#11'OgDaysCode1'#9'OnChecked'#7#11'CodeChecked'#8 - +'OnGetKey'#7#6'GetKey'#9'OnGetCode'#7#7'GetCode'#12'OnChangeCode'#7#10'Chang' - +'eCode'#4'Left'#3#192#0#3'Top'#3#200#0#0#0#0 -]); diff --git a/components/onguard/examples/exdyreg/exdyregu.pas b/components/onguard/examples/exdyreg/exdyregu.pas index 921dfff9c..acb995cf2 100644 --- a/components/onguard/examples/exdyreg/exdyregu.pas +++ b/components/onguard/examples/exdyreg/exdyregu.pas @@ -4,8 +4,8 @@ unit ExDYRegU; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Buttons,LResources, ExtCtrls, OnGuard, IniFiles, OgUtil; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil; type @@ -38,7 +38,10 @@ var implementation +{$R *.lfm} +uses + IniFiles; procedure TForm1.CodeChecked(Sender: TObject; Status: TCodeStatus); var @@ -96,6 +99,7 @@ begin Ini := TIniFile.Create('ONGUARD.INI'); try {store the date code in the ini file if it looks OK} + Work := Default(TCode); if HexToBuffer(S, Work, SizeOf(Work)) then begin {save the value} Ini.WriteString('Codes', 'DaysCode', S); @@ -144,7 +148,5 @@ begin end; end; -initialization -{$i exdyregu.lrs} end. diff --git a/components/onguard/examples/exdys30/exdys30.lpi b/components/onguard/examples/exdys30/exdys30.lpi index 0800ee72c..81229f0cc 100644 --- a/components/onguard/examples/exdys30/exdys30.lpi +++ b/components/onguard/examples/exdys30/exdys30.lpi @@ -58,8 +58,8 @@ - - + + @@ -97,7 +97,7 @@ - + @@ -138,6 +138,18 @@ + + + + + + + + + + + + diff --git a/components/onguard/examples/exdys30/exdys30u.lrs b/components/onguard/examples/exdys30/exdys30u.lrs deleted file mode 100644 index b46a71699..000000000 --- a/components/onguard/examples/exdys30/exdys30u.lrs +++ /dev/null @@ -1,30 +0,0 @@ -{ 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#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#5'Form1'#12'ClientHe' - +'ight'#3#158#0#11'ClientWidth'#3#229#0#8'OnCreate'#7#10'FormCreate'#8'Positi' - +'on'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#16'lblDays' - +'Remaining'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9 - +'asrCenter'#21'AnchorSideTop.Control'#7#4'Info'#18'AnchorSideTop.Side'#7#9'a' - +'srBottom'#4'Left'#2'E'#6'Height'#2#15#3'Top'#2':'#5'Width'#2'['#9'Alignment' - +#7#8'taCenter'#17'BorderSpacing.Top'#2#16#7'Caption'#6#16'Days Remaining: ' - +#11'ParentColor'#8#0#0#7'TBitBtn'#8'CloseBtn'#22'AnchorSideLeft.Control'#7#5 - +'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#6 - +'Bevel1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'['#6'Height'#2#26#3 - +'Top'#2'h'#5'Width'#2'.'#8'AutoSize'#9#17'BorderSpacing.Top'#2#12#20'BorderS' - +'pacing.Bottom'#2#12#4'Kind'#7#7'bkClose'#8'TabOrder'#2#0#0#0#6'TLabel'#4'In' - +'fo'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Own' - +'er'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asr' - +'Bottom'#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'BorderSpacing.Around'#2#12#7'Caption' - +#6':If you can edit this, then your program was allowed to run'#8'WordWrap'#9 - +#0#0#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#4'Info'#21'AnchorSideT' - +'op.Control'#7#16'lblDaysRemaining'#18'AnchorSideTop.Side'#7#9'asrBottom'#23 - +'AnchorSideRight.Control'#7#4'Info'#20'AnchorSideRight.Side'#7#9'asrBottom'#4 - +'Left'#2#12#6'Height'#2#3#3'Top'#2'Y'#5'Width'#3#205#0#7'Anchors'#11#5'akTop' - +#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#16#5'Shape'#7#9'bsTopLine'#0 - +#0#11'TOgDaysCode'#11'OgDaysCode1'#9'OnChecked'#7#18'OgDaysCode1Checked'#8'O' - +'nGetKey'#7#17'OgDaysCode1GetKey'#9'OnGetCode'#7#18'OgDaysCode1GetCode'#12'O' - +'nChangeCode'#7#21'OgDaysCode1ChangeCode'#4'Left'#2'('#3'Top'#2'X'#0#0#0 -]); diff --git a/components/onguard/examples/exdys30/exdys30u.pas b/components/onguard/examples/exdys30/exdys30u.pas index f79968f6c..28c17177f 100644 --- a/components/onguard/examples/exdys30/exdys30u.pas +++ b/components/onguard/examples/exdys30/exdys30u.pas @@ -12,9 +12,9 @@ unit Exdys30u; interface uses - SysUtils, Classes, Controls, - Forms, Dialogs, LResources, StdCtrls, Buttons, ExtCtrls, - OnGuard, OgUtil, IniFiles; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + IniFiles, + OnGuard, OgUtil; const CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8, @@ -36,7 +36,7 @@ type procedure OgDaysCode1ChangeCode(Sender: TObject; Code: TCode); procedure OgDaysCode1Checked(Sender: TObject; Status: TCodeStatus); private - codeinvalid : Boolean; + codeInvalid: Boolean; public { Public declarations } TheDir : string; @@ -48,7 +48,7 @@ var implementation - +{$R *.lfm} {==========================================================================} @@ -59,7 +59,7 @@ end; procedure TForm1.FormCreate(Sender: TObject); begin - codeinvalid := false; + codeInvalid := false; end; {==========================================================================} @@ -104,7 +104,7 @@ end; procedure TForm1.OgDaysCode1ChangeCode(Sender: TObject; Code: TCode); var - S : string; + S: string; begin if codeinvalid then Exit; IniFile := TIniFile.Create(TheDir + 'Days30.INI'); @@ -124,29 +124,24 @@ var S : string; begin case Status of - ogValidCode : begin - lblDaysRemaining.Caption := 'Days Remaining: ' - + IntToStr(OgDaysCode1.GetValue); - Exit; - end; - - ogInvalidCode : - begin - S := 'Invalid Code'; - codeinvalid := true; - end; - - ogDayCountUsed : S := 'Program used more than 30 days' + #13 + - 'Please register NOW'; - - ogCodeExpired : S := 'Evaluation period expired' + #13 + - 'Please register NOW'; + ogValidCode: + begin + lblDaysRemaining.Caption := Format('Days Remaining: %d', [OgDaysCode1.GetValue]); + Exit; + end; + ogInvalidCode: + begin + S := 'Invalid Code'; + codeInvalid := true; + end; + ogDayCountUsed: + S := 'Program used more than 30 days' + LineEnding + 'Please register NOW'; + ogCodeExpired: + S := 'Evaluation period expired' + LineEnding + 'Please register NOW'; end; ShowMessage(S); Application.Terminate; end; -initialization -{$i exdys30u.lrs} end. diff --git a/components/onguard/examples/exinst/exinst.lpi b/components/onguard/examples/exinst/exinst.lpi index fd29afc32..002341b50 100644 --- a/components/onguard/examples/exinst/exinst.lpi +++ b/components/onguard/examples/exinst/exinst.lpi @@ -59,7 +59,7 @@ - + diff --git a/components/onguard/examples/exinst/exinstu.lrs b/components/onguard/examples/exinst/exinstu.lrs deleted file mode 100644 index 9391484b9..000000000 --- a/components/onguard/examples/exinst/exinstu.lrs +++ /dev/null @@ -1,19 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TFirstInstFrm','FORMDATA',[ - 'TPF0'#13'TFirstInstFrm'#12'FirstInstFrm'#4'Left'#3'G'#1#6'Height'#3#140#0#3 - +'Top'#3#218#0#5'Width'#3'@'#1#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7 - +'Caption'#6#23'Single Instance Example'#12'ClientHeight'#3#140#0#11'ClientWi' - +'dth'#3'@'#1#10'LCLVersion'#6#7'2.3.0.0'#0#7'TBitBtn'#7'BitBtn2'#21'AnchorSi' - +'deTop.Control'#7#4'Info'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSid' - +'eRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3 - +#233#0#6'Height'#2#25#3'Top'#2'E'#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akR' - +'ight'#0#19'BorderSpacing.Right'#2#12#20'BorderSpacing.Bottom'#2#12#4'Kind'#7 - +#7'bkClose'#8'TabOrder'#2#0#0#0#6'TLabel'#4'Info'#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 - +'-'#3'Top'#2#12#5'Width'#3'('#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0 - +#20'BorderSpacing.Around'#2#12#7'Caption'#6#131'Attempts to execute this app' - +'lication a second time result in the first instance to be activated and the' - +' second instance terminated.'#8'WordWrap'#9#0#0#0 -]); diff --git a/components/onguard/examples/exinst/exinstu.pas b/components/onguard/examples/exinst/exinstu.pas index e69f63c3c..e8dc8477d 100644 --- a/components/onguard/examples/exinst/exinstu.pas +++ b/components/onguard/examples/exinst/exinstu.pas @@ -3,8 +3,7 @@ unit EXINSTU; interface uses - SysUtils, Classes, Graphics, - Forms, Dialogs, StdCtrls, Buttons, Controls,LResources; + SysUtils, Classes, Graphics, Forms, Dialogs, StdCtrls, Buttons, Controls; type @@ -24,7 +23,6 @@ var implementation -initialization -{$I exinstu.lrs} +{$R *.lfm} end. diff --git a/components/onguard/examples/exmachid/exmachid.lpi b/components/onguard/examples/exmachid/exmachid.lpi index b9343da9e..c58866325 100644 --- a/components/onguard/examples/exmachid/exmachid.lpi +++ b/components/onguard/examples/exmachid/exmachid.lpi @@ -59,8 +59,8 @@ - - + + diff --git a/components/onguard/examples/exmachid/umachid.lrs b/components/onguard/examples/exmachid/umachid.lrs deleted file mode 100644 index 32a400903..000000000 --- a/components/onguard/examples/exmachid/umachid.lrs +++ /dev/null @@ -1,41 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TfrmExMachineID','FORMDATA',[ - 'TPF0'#15'TfrmExMachineID'#14'frmExMachineID'#4'Left'#3'l'#1#6'Height'#3#157#0 - +#3'Top'#3#254#0#5'Width'#3#21#1#13'ActiveControl'#7#7'chkUser'#8'AutoSize'#9 - +#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bs' - +'Dialog'#7'Caption'#6#11'ExMachineID'#12'ClientHeight'#3#157#0#11'ClientWidt' - +'h'#3#21#1#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#9 - +'TGroupBox'#9'GroupBox1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSide' - +'Top.Control'#7#5'Owner'#4'Left'#2#12#6'Height'#2'n'#3'Top'#2#12#5'Width'#2 - +'r'#8'AutoSize'#9#20'BorderSpacing.Around'#2#12#7'Caption'#6#18' Machine Inf' - +'o Set '#12'ClientHeight'#2'Z'#11'ClientWidth'#2'n'#8'TabOrder'#2#0#0#9'TChe' - +'ckBox'#7'chkUser'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTo' - +'p.Control'#7#9'GroupBox1'#4'Left'#2#16#6'Height'#2#19#3'Top'#2#4#5'Width'#2 - +')'#18'BorderSpacing.Left'#2#16#17'BorderSpacing.Top'#2#4#19'BorderSpacing.R' - +'ight'#2#16#7'Caption'#6#4'User'#8'TabOrder'#2#0#0#0#9'TCheckBox'#9'chkSyste' - +'m'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control'#7#7 - +'chkUser'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#16#6'Height'#2#19#3 - +'Top'#2#23#5'Width'#2'8'#18'BorderSpacing.Left'#2#16#19'BorderSpacing.Right' - +#2#16#7'Caption'#6#6'System'#8'TabOrder'#2#1#0#0#9'TCheckBox'#10'chkNetwork' - +#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control'#7#9'chk' - +'System'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#16#6'Height'#2#19#3 - +'Top'#2'*'#5'Width'#2'?'#18'BorderSpacing.Left'#2#16#19'BorderSpacing.Right' - +#2#24#7'Caption'#6#7'Network'#8'TabOrder'#2#2#0#0#9'TCheckBox'#9'chkDrives' - +#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control'#7#10'ch' - +'kNetwork'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#16#6'Height'#2#19 - +#3'Top'#2'='#5'Width'#2'2'#18'BorderSpacing.Left'#2#16#19'BorderSpacing.Righ' - +'t'#2#16#20'BorderSpacing.Bottom'#2#10#7'Caption'#6#6'Drives'#8'TabOrder'#2#3 - +#0#0#0#7'TButton'#11'btnGenerate'#22'AnchorSideLeft.Control'#7#9'GroupBox1' - +#19'AnchorSideLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#6'Bev' - +'el1'#4'Left'#3#138#0#6'Height'#2#25#3'Top'#2'&'#5'Width'#2'K'#7'Anchors'#11 - +#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#12#25'BorderSpacing.InnerB' - +'order'#2#4#7'Caption'#6#8'Generate'#7'OnClick'#7#16'btnGenerateClick'#8'Tab' - +'Order'#2#1#0#0#5'TEdit'#12'edtMachineID'#22'AnchorSideLeft.Control'#7#11'bt' - +'nGenerate'#21'AnchorSideTop.Control'#7#6'Bevel1'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#4'Left'#3#138#0#6'Height'#2#23#3'Top'#2'H'#5'Width'#2'z'#19'Bord' - +'erSpacing.Right'#2#12#8'ReadOnly'#9#8'TabOrder'#2#2#0#0#6'TBevel'#6'Bevel1' - +#21'AnchorSideTop.Control'#7#9'GroupBox1'#18'AnchorSideTop.Side'#7#9'asrCent' - +'er'#4'Left'#3#128#0#6'Height'#2#9#3'Top'#2'?'#5'Width'#2#16#5'Shape'#7#8'bs' - +'Spacer'#0#0#0 -]); diff --git a/components/onguard/examples/exmachid/umachid.pas b/components/onguard/examples/exmachid/umachid.pas index 69cb4a31b..c410305ec 100644 --- a/components/onguard/examples/exmachid/umachid.pas +++ b/components/onguard/examples/exmachid/umachid.pas @@ -3,8 +3,7 @@ unit uMachID; interface uses - SysUtils, Classes, - Graphics, Controls, Forms, Dialogs,Buttons, StdCtrls,LResources, ExtCtrls; + SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Buttons, StdCtrls, ExtCtrls; type @@ -31,6 +30,8 @@ var implementation +{$R *.lfm} + uses onguard, ogutil; @@ -59,8 +60,6 @@ begin end; end; -initialization -{$I umachid.lrs} end. diff --git a/components/onguard/examples/exnet/EXNET.NAF b/components/onguard/examples/exnet/EXNET.NAF index 1b648349c..5e9abd8c3 100644 Binary files a/components/onguard/examples/exnet/EXNET.NAF and b/components/onguard/examples/exnet/EXNET.NAF differ diff --git a/components/onguard/examples/exnet/exnet.lpi b/components/onguard/examples/exnet/exnet.lpi index 5280d55bc..ba9bec4e5 100644 --- a/components/onguard/examples/exnet/exnet.lpi +++ b/components/onguard/examples/exnet/exnet.lpi @@ -58,8 +58,8 @@ - - + + @@ -83,7 +83,7 @@ - + @@ -96,6 +96,14 @@ + + + + + + + + diff --git a/components/onguard/examples/exnet/exnetu.lrs b/components/onguard/examples/exnet/exnetu.lrs deleted file mode 100644 index 05c442fd0..000000000 --- a/components/onguard/examples/exnet/exnetu.lrs +++ /dev/null @@ -1,56 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#2#1#6'Height'#3'='#1#3'Top'#3#146#0#5'Wid' - +'th'#3#234#1#18'HorzScrollBar.Page'#3#233#1#18'VertScrollBar.Page'#3'<'#1#8 - +'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#20'Network Code Exam' - +'ple'#12'ClientHeight'#3'='#1#11'ClientWidth'#3#234#1#8'OnCreate'#7#10'FormC' - +'reate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLa' - +'bel'#9'StatusLbl'#22'AnchorSideLeft.Control'#7#4'Info'#21'AnchorSideTop.Con' - +'trol'#7#8'CloseBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'He' - +'ight'#2#15#3'Top'#3#244#0#5'Width'#2' '#20'BorderSpacing.Bottom'#2#12#7'Cap' - +'tion'#6#6'Status'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'La' - +'bel1'#22'AnchorSideLeft.Control'#7#7'CodeBtn'#19'AnchorSideLeft.Side'#7#9'a' - +'srBottom'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9 - +'asrCenter'#4'Left'#3#181#0#6'Height'#2#15#3'Top'#2#17#5'Width'#2'H'#18'Bord' - +'erSpacing.Left'#2'P'#7'Caption'#6#13'Current code:'#5'Color'#7#6'clNone'#11 - +'ParentColor'#8#0#0#6'TLabel'#7'CodeLbl'#22'AnchorSideLeft.Control'#7#6'Labe' - +'l1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#7'Co' - +'deBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#9#1#6'Height'#2#15#3 - +'Top'#2#17#5'Width'#2'`'#18'BorderSpacing.Left'#2#12#7'Caption'#6#16'0000000' - +'000000000'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#7'TButton'#7'CodeBtn' - +#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4 - +'Left'#2#12#6'Height'#2#25#3'Top'#2#12#5'Width'#2'Y'#20'BorderSpacing.Around' - +#2#12#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#10'Enter Code'#7'OnClic' - +'k'#7#12'CodeBtnClick'#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'CloseBtn'#21'AnchorS' - +'ideTop.Control'#7#6'Bevel1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Anchor' - +'SideRight.Control'#7#4'Info'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left' - +#3#147#1#6'Height'#2#25#3'Top'#3#239#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7 - +'akRight'#0#17'BorderSpacing.Top'#2#10#20'BorderSpacing.Bottom'#2#12#4'Kind' - +#7#7'bkClose'#8'TabOrder'#2#1#0#0#7'TButton'#9'RemoveBtn'#21'AnchorSideTop.C' - +'ontrol'#7#8'CloseBtn'#23'AnchorSideRight.Control'#7#8'CloseBtn'#4'Left'#3'.' - +#1#6'Height'#2#25#3'Top'#3#239#0#5'Width'#2'a'#7'Anchors'#11#5'akTop'#7'akRi' - +'ght'#0#19'BorderSpacing.Right'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Capt' - +'ion'#6#11'Remove Code'#7'OnClick'#7#14'RemoveBtnClick'#8'TabOrder'#2#2#0#0#6 - +'TLabel'#4'Info'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Cont' - +'rol'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.' - +'Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6 - +'Height'#3#165#0#3'Top'#2'1'#5'Width'#3#210#1#7'Anchors'#11#5'akTop'#6'akLef' - +'t'#7'akRight'#0#20'BorderSpacing.Around'#2#12#7'Caption'#12'H'#2#0#0'The la' - +'bel at the bottom of this form indicates the status of the code. An invalid' - +' code indicates that the code is either the incorrect type or that none has' - +' been entered. '#13#10#13#10'If the proper code has not been entered or the' - +' ONGUARD.INI file was deleted, the message will say that the code is invali' - +'d.'#13#10#13#10'Use the "Enter Code" button to enter a code (the CODEGEN pr' - +'ogram can be used to generate the proper "Usage" code). '#13#10#13#10'The "' - +'Remove Code" button can be used to remove the entered code from the INI fil' - +'e. Doing so will cause the TOgNetCode component to report that the code is ' - +'invalid.'#5'Color'#7#9'clBtnFace'#11'ParentColor'#8#8'WordWrap'#9#0#0#6'TBe' - +'vel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#4'Info'#21'AnchorSideTop.Contro' - +'l'#7#4'Info'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Contr' - +'ol'#7#4'Info'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height' - +#2#3#3'Top'#3#226#0#5'Width'#3#210#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRi' - +'ght'#0#5'Shape'#7#9'bsTopLine'#0#0#10'TOgNetCode'#10'OgNetCode1'#9'OnChecke' - +'d'#7#11'CodeChecked'#8'OnGetKey'#7#6'GetKey'#9'OnGetCode'#7#7'GetCode'#8'Fi' - +'leName'#6#9'EXNET.NAF'#4'Left'#3#192#0#3'Top'#3#208#0#0#0#0 -]); diff --git a/components/onguard/examples/exnet/exnetu.pas b/components/onguard/examples/exnet/exnetu.pas index 1f78f19bc..9ece4d418 100644 --- a/components/onguard/examples/exnet/exnetu.pas +++ b/components/onguard/examples/exnet/exnetu.pas @@ -4,8 +4,8 @@ unit Exnetu; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Buttons,LResources, ExtCtrls, OnGuard, IniFiles, OgUtil, OgNetWrk; + SysUtils, Classes,Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil, OgNetWrk; type @@ -39,6 +39,10 @@ var implementation +{$R *.lfm} + +uses + IniFiles; procedure TForm1.CodeChecked(Sender: TObject; Status: TCodeStatus); @@ -97,6 +101,7 @@ begin Ini := TIniFile.Create('ONGUARD.INI'); try {store the code in the ini file if it looks OK} + Work := Default(TCode); if HexToBuffer(S, Work, SizeOf(Work)) then begin {save the value} Ini.WriteString('Codes', 'NetCode', S); @@ -156,11 +161,10 @@ procedure TForm1.FormCreate(Sender: TObject); var Code : TCode; begin - {force code label to update} + {force code label to update} + Code := Default(TCode); GetCode(Self, Code); end; -initialization -{$i exnetu.lrs} end. diff --git a/components/onguard/examples/exprot/exprot.lpi b/components/onguard/examples/exprot/exprot.lpi index 62ed0677e..63fc7cb65 100644 --- a/components/onguard/examples/exprot/exprot.lpi +++ b/components/onguard/examples/exprot/exprot.lpi @@ -60,7 +60,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -90,6 +90,10 @@ + + + + diff --git a/components/onguard/examples/exprot/exprotu.lrs b/components/onguard/examples/exprot/exprotu.lrs deleted file mode 100644 index 864dc7c95..000000000 --- a/components/onguard/examples/exprot/exprotu.lrs +++ /dev/null @@ -1,30 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#2#1#6'Height'#3#200#0#3'Top'#3#146#0#5'Wi' - +'dth'#3#128#1#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#19'Pr' - +'otect Exe Example'#12'ClientHeight'#3#200#0#11'ClientWidth'#3#128#1#8'Posit' - +'ion'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#9'StatusL' - +'bl'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#8'Clo' - +'seBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#15#3 - +'Top'#3#164#0#5'Width'#2' '#18'BorderSpacing.Left'#2#12#7'Caption'#6#6'Statu' - +'s'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#7'TBitBtn'#8'CloseBtn'#21'Anc' - +'horSideTop.Control'#7#6'Bevel1'#18'AnchorSideTop.Side'#7#9'asrBottom'#20'An' - +'chorSideRight.Side'#7#9'asrBottom'#4'Left'#3')'#1#6'Height'#2#25#3'Top'#3 - +#159#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Ar' - +'ound'#2#12#4'Kind'#7#7'bkClose'#8'TabOrder'#2#0#0#0#6'TLabel'#4'Info'#22'An' - +'chorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'An' - +'chorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4 - +'Left'#2#12#6'Height'#2'x'#3'Top'#2#12#5'Width'#3'h'#1#7'Anchors'#11#5'akTop' - +#6'akLeft'#7'akRight'#0#20'BorderSpacing.Around'#2#12#7'Caption'#6#250'The l' - +'abel at the bottom of this form indicates the status of the EXE file. '#13 - +#10#13#10'If the EXE file has not been stamped, use the StampEXE program to ' - +'protect it.'#13#10#13#10'The EXE file will need to be stamped after each co' - +'mpile since this re-writes the EXE file.'#8'WordWrap'#9#0#0#6'TBevel'#6'Bev' - +'el1'#22'AnchorSideLeft.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#4'Inf' - +'o'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#4'In' - +'fo'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2#3#3'To' - +'p'#3#144#0#5'Width'#3'h'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#5 - +'Shape'#7#9'bsTopLine'#0#0#13'TOgProtectExe'#13'OgProtectExe1'#9'OnChecked'#7 - +#20'OgProtectExe1Checked'#4'Left'#3#136#0#3'Top'#2'X'#0#0#0 -]); diff --git a/components/onguard/examples/exprot/exprotu.pas b/components/onguard/examples/exprot/exprotu.pas index b004c55cf..69ca307a3 100644 --- a/components/onguard/examples/exprot/exprotu.pas +++ b/components/onguard/examples/exprot/exprotu.pas @@ -3,8 +3,7 @@ unit EXPROTU; interface uses - SysUtils, Classes, - Controls, Forms, Dialogs, StdCtrls, Buttons, LResources, ExtCtrls, + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, ogutil, ogproexe; type @@ -29,6 +28,8 @@ var implementation +{$R *.lfm} + procedure TForm1.OgProtectExe1Checked(Sender: TObject; Status: TExeStatus); var S : string; @@ -44,7 +45,5 @@ begin StatusLbl.Caption := S; end; -initialization -{$i exprotu.lrs} end. diff --git a/components/onguard/examples/exreg/exreg.lpi b/components/onguard/examples/exreg/exreg.lpi index 1b28ab287..17220de74 100644 --- a/components/onguard/examples/exreg/exreg.lpi +++ b/components/onguard/examples/exreg/exreg.lpi @@ -58,8 +58,8 @@ - - + + @@ -111,119 +111,120 @@ - + - - + + - - + + - + + - - + + - - + + - + - + - + - + - - + - + - - + - + - + - + - + + - + - + + - + - + - + - + - + - + @@ -255,15 +256,6 @@ - - - - - - - - - diff --git a/components/onguard/examples/exreg/exreg1.lrs b/components/onguard/examples/exreg/exreg1.lrs deleted file mode 100644 index 11cb0c38a..000000000 --- a/components/onguard/examples/exreg/exreg1.lrs +++ /dev/null @@ -1,114 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TfrmExRegCode','FORMDATA',[ - 'TPF0'#13'TfrmExRegCode'#12'frmExRegCode'#4'Left'#3#135#1#6'Height'#3'*'#1#3 - +'Top'#3#180#0#5'Width'#3#135#1#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#25 - +'Registration Code Example'#12'ClientHeight'#3'*'#1#11'ClientWidth'#3#135#1#8 - +'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6 - +#7'2.3.0.0'#0#9'TGroupBox'#9'GroupBox1'#22'AnchorSideLeft.Control'#7#5'Owner' - +#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#12#6'Height'#2'y'#3'Top'#2#12 - +#5'Width'#3'r'#1#8'AutoSize'#9#18'BorderSpacing.Left'#2#12#17'BorderSpacing.' - +'Top'#2#12#19'BorderSpacing.Right'#2#12#20'BorderSpacing.Bottom'#2#12#7'Capt' - +'ion'#6'+ Registration Code Generator (vendor site) '#12'ClientHeight'#2'e' - +#11'ClientWidth'#3'n'#1#8'TabOrder'#2#0#0#6'TLabel'#6'Label1'#21'AnchorSideT' - +'op.Control'#7#12'edtUserName1'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'Anc' - +'horSideRight.Control'#7#6'Label3'#20'AnchorSideRight.Side'#7#9'asrBottom'#4 - +'Left'#2''''#6'Height'#2#15#3'Top'#2#8#5'Width'#2'F'#9'Alignment'#7#14'taRig' - +'htJustify'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#7'Caption'#6#10'Us' - +'er Name:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#21'AnchorSideTop.Contro' - +'l'#7#6'edDate'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Con' - +'trol'#7#6'Label3'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#26#6'He' - +'ight'#2#15#3'Top'#2''''#5'Width'#2'S'#9'Alignment'#7#14'taRightJustify'#7'A' - +'nchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#16'Expiration Date:'#11'Paren' - +'tColor'#8#0#0#6'TLabel'#6'Label3'#22'AnchorSideLeft.Control'#7#9'GroupBox1' - +#21'AnchorSideTop.Control'#7#11'edtRegCode1'#18'AnchorSideTop.Side'#7#9'asrC' - +'enter'#4'Left'#2#12#6'Height'#2#15#3'Top'#2'F'#5'Width'#2'a'#9'Alignment'#7 - +#14'taRightJustify'#18'BorderSpacing.Left'#2#12#7'Caption'#6#18'Registration' - +' Code:'#11'ParentColor'#8#0#0#12'TSpeedButton'#11'btnGenerate'#21'AnchorSid' - +'eTop.Control'#7#11'edtRegCode1'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'An' - +'chorSideRight.Control'#7#9'GroupBox1'#20'AnchorSideRight.Side'#7#9'asrBotto' - +'m'#4'Left'#3'K'#1#6'Height'#2#22#4'Hint'#6#26'Generate Registration Code'#3 - +'Top'#2'B'#5'Width'#2#23#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpacin' - +'g.Right'#2#12#10'Glyph.Data'#10'F'#1#0#0'B'#1#0#0'BMB'#1#0#0#0#0#0#0'v'#0#0 - +#0'('#0#0#0#17#0#0#0#17#0#0#0#1#0#4#0#0#0#0#0#204#0#0#0#0#0#0#0#0#0#0#0#16#0 - +#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0 - +#128#128#0#0#128#128#128#0#192#192#192#0#0#0#255#0#0#255#0#0#0#255#255#0#255 - +#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0#136#136#136#136#136#136#136#136 - +#128#0#0#0#136#136#136#136#136#136#136#136#128#0#0#0#136#136#136#0#0#8#136 - +#136#128#0#0#0#136#136#0#136#128#128#8#136#128#0#0#0#136#128#128#136#136#136 - +#0#136#128#0#0#0#136#8#136#128#0#136#136#8#128#0#0#0#136#0#136#0#0#8#136#8 - +#128#0#0#0#128#136#128#9#137#0#128#128#128#0#0#0#128#136#128#8#152#0#136#128 - +#128#0#0#0#128#8#128#8#152#0#136#0#128#0#0#0#128#136#128#9#137#0#136#128#128 - +#0#0#0#136#8#136#0#0#8#136#8#128#0#0#0#136#8#8#128#0#136#8#8#128#0#0#0#136 - +#128#136#8#136#136#128#136#128#0#0#0#136#136#0#136#128#128#8#136#128#0#0#0 - +#136#136#136#0#0#8#136#136#128#0#0#0#136#136#136#136#136#136#136#136#128#0#0 - +#0#7'OnClick'#7#16'btnGenerateClick'#8'ShowHint'#9#14'ParentShowHint'#8#0#0#5 - +'TEdit'#12'edtUserName1'#22'AnchorSideLeft.Control'#7#11'edtRegCode1'#21'Anc' - +'horSideTop.Control'#7#9'GroupBox1'#4'Left'#2'y'#6'Height'#2#23#3'Top'#2#4#5 - +'Width'#3#233#0#17'BorderSpacing.Top'#2#4#19'BorderSpacing.Right'#2#12#8'Tab' - +'Order'#2#0#0#0#5'TEdit'#11'edtRegCode1'#22'AnchorSideLeft.Control'#7#6'Labe' - +'l3'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#6'ed' - +'Date'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#11 - +'btnGenerate'#4'Left'#2'y'#6'Height'#2#23#3'Top'#2'B'#5'Width'#3#206#0#7'Anc' - +'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#12#17'Bor' - +'derSpacing.Top'#2#8#19'BorderSpacing.Right'#2#4#20'BorderSpacing.Bottom'#2 - +#12#5'Color'#7#9'clBtnFace'#8'ReadOnly'#9#8'TabOrder'#2#1#0#0#5'TEdit'#6'edD' - +'ate'#22'AnchorSideLeft.Control'#7#11'edtRegCode1'#21'AnchorSideTop.Control' - +#7#12'edtUserName1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'y'#6'Hei' - +'ght'#2#23#3'Top'#2'#'#5'Width'#2'v'#17'BorderSpacing.Top'#2#8#8'TabOrder'#2 - +#2#0#0#0#9'TGroupBox'#9'GroupBox2'#22'AnchorSideLeft.Control'#7#5'Owner'#23 - +'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom' - +#4'Left'#2#12#6'Height'#2'y'#3'Top'#3#152#0#5'Width'#3'o'#1#7'Anchors'#11#5 - +'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#12#17 - +'BorderSpacing.Top'#2#24#19'BorderSpacing.Right'#2#12#20'BorderSpacing.Botto' - +'m'#2#12#7'Caption'#6'. Registration Code Verification (client site) '#12'Cl' - +'ientHeight'#2'e'#11'ClientWidth'#3'k'#1#8'TabOrder'#2#1#0#6'TLabel'#6'Label' - +'4'#21'AnchorSideTop.Control'#7#12'edtUserName2'#18'AnchorSideTop.Side'#7#9 - +'asrCenter'#23'AnchorSideRight.Control'#7#6'Label5'#20'AnchorSideRight.Side' - ,#7#9'asrBottom'#4'Left'#2'0'#6'Height'#2#15#3'Top'#2''''#5'Width'#2'='#9'Ali' - +'gnment'#7#14'taRightJustify'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption' - +#6#10'User Name:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#22'AnchorSideLef' - +'t.Control'#7#9'GroupBox2'#21'AnchorSideTop.Control'#7#11'edtRegCode2'#18'An' - +'chorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#15#3'Top'#2#8#5'W' - +'idth'#2'a'#9'Alignment'#7#14'taRightJustify'#18'BorderSpacing.Left'#2#12#7 - +'Caption'#6#18'Registration Code:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label6' - +#21'AnchorSideTop.Control'#7#9'edtStatus'#18'AnchorSideTop.Side'#7#9'asrCent' - +'er'#23'AnchorSideRight.Control'#7#6'Label4'#20'AnchorSideRight.Side'#7#9'as' - +'rBottom'#4'Left'#2'J'#6'Height'#2#15#3'Top'#2'F'#5'Width'#2'#'#9'Alignment' - +#7#14'taRightJustify'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#7'Sta' - +'tus:'#11'ParentColor'#8#0#0#12'TSpeedButton'#9'btnVerify'#22'AnchorSideLeft' - +'.Control'#7#9'edtStatus'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSi' - +'deTop.Control'#7#9'edtStatus'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left' - +#3#254#0#6'Height'#2#22#4'Hint'#6#24'Verify Registration Code'#3'Top'#2'B'#5 - +'Width'#2#23#18'BorderSpacing.Left'#2#4#20'BorderSpacing.Bottom'#2#12#10'Gly' - +'ph.Data'#10'F'#1#0#0'B'#1#0#0'BMB'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#17#0#0#0 - +#17#0#0#0#1#0#4#0#0#0#0#0#204#0#0#0#0#0#0#0#0#0#0#0#16#0#0#0#0#0#0#0#0#0#0#0 - +#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128 - +#128#0#192#192#192#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0 - +#255#255#0#0#255#255#255#0#136#136#136#136#136#136#136#136#128#0#0#0#136#136 - +#136#136#136#136#136#136#128#0#0#0#136#136#136#136#136#136#136#136#128#0#0#0 - +#136#136#136#136#136#136#136#136#128#0#0#0#136#136#136#136#136#136#136#136 - +#128#0#0#0#136#136#0#8#136#136#136#136#128#0#0#0#136#128#0#0#136#8#136#128 - +#128#0#0#0#136#0#152#144#8#8#0#128#128#0#0#0#136#0#137#128#0#0#0#0#128#0#0#0 - +#136#0#137#128#0#0#0#0#128#0#0#0#136#0#152#144#8#136#136#136#128#0#0#0#136 - +#128#0#0#136#136#136#136#128#0#0#0#136#136#0#8#136#136#136#136#128#0#0#0#136 - +#136#136#136#136#136#136#136#128#0#0#0#136#136#136#136#136#136#136#136#128#0 - +#0#0#136#136#136#136#136#136#136#136#128#0#0#0#136#136#136#136#136#136#136 - +#136#128#0#0#0#7'OnClick'#7#14'btnVerifyClick'#8'ShowHint'#9#14'ParentShowHi' - +'nt'#8#0#0#5'TEdit'#12'edtUserName2'#22'AnchorSideLeft.Control'#7#11'edtRegC' - +'ode2'#21'AnchorSideTop.Control'#7#11'edtRegCode2'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#23'AnchorSideRight.Control'#7#9'GroupBox2'#20'AnchorSideRight.Si' - +'de'#7#9'asrBottom'#4'Left'#2'y'#6'Height'#2#23#3'Top'#2'#'#5'Width'#3#230#0 - +#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#8#19 - +'BorderSpacing.Right'#2#12#8'TabOrder'#2#0#0#0#5'TEdit'#11'edtRegCode2'#22'A' - +'nchorSideLeft.Control'#7#6'Label5'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21 - +'AnchorSideTop.Control'#7#9'GroupBox2'#23'AnchorSideRight.Control'#7#9'Group' - +'Box2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'y'#6'Height'#2#23#3 - +'Top'#2#4#5'Width'#3#230#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18 - +'BorderSpacing.Left'#2#12#17'BorderSpacing.Top'#2#4#19'BorderSpacing.Right'#2 - +#12#8'TabOrder'#2#1#0#0#5'TEdit'#9'edtStatus'#22'AnchorSideLeft.Control'#7#11 - +'edtRegCode2'#21'AnchorSideTop.Control'#7#12'edtUserName2'#18'AnchorSideTop.' - +'Side'#7#9'asrBottom'#4'Left'#2'y'#6'Height'#2#23#3'Top'#2'B'#5'Width'#3#129 - +#0#17'BorderSpacing.Top'#2#8#20'BorderSpacing.Bottom'#2#12#5'Color'#7#9'clBt' - +'nFace'#8'ReadOnly'#9#8'TabOrder'#2#2#0#0#0#0 -]); diff --git a/components/onguard/examples/exreg/exreg1.pas b/components/onguard/examples/exreg/exreg1.pas index 6e405dca1..3998cc0d7 100644 --- a/components/onguard/examples/exreg/exreg1.pas +++ b/components/onguard/examples/exreg/exreg1.pas @@ -3,8 +3,7 @@ unit ExReg1; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, ComCtrls, Buttons,LResources, EditBtn; + SysUtils, Classes,Controls, Forms, Dialogs, StdCtrls, ComCtrls, Buttons; type @@ -41,7 +40,7 @@ var implementation - +{$R *.lfm} uses OnGuard, OgUtil; @@ -49,8 +48,6 @@ uses const EncryptionKey : TKey = ($E5, $8F, $84, $D6, $92, $C9, $A4, $D8, $1A, $FA, $6F, $8D, $AB, $FC, $DF, $B4); -const - DATE_FORMAT = 'yyyy-mm-dd'; procedure TfrmExRegCode.btnGenerateClick(Sender: TObject); var @@ -61,13 +58,21 @@ var var fs: TFormatSettings; begin - fs := FormatSettings; - fs.ShortDateFormat := 'yyyy/mm/dd'; - fs.DateSeparator := '-'; - D := StrToDate(edDate.Text, fs); + if not TryStrToDate(edDate.Text, D) then + begin + fs := FormatSettings; + fs.ShortDateFormat := 'yyyy/mm/dd'; + fs.DateSeparator := '-'; + if not TryStrToDate(edDate.Text, D, fs) then + begin + MessageDlg('Invalid date.', mtError, [mbOK], 0); + exit; + end; + end; Key := EncryptionKey; Modifier := StringHashELF(edtUserName1.Text); ApplyModifierToKeyPrim(Modifier, Key, SizeOf(Key)); + Code := Default(TCode); InitRegCode(Key, '', D, Code); edtRegCode1.Text := BufferToHex(Code, SizeOf(Code)); end; @@ -77,11 +82,11 @@ var Key : TKey; Code : TCode; Modifier : Longint; - d : TDateTime; begin Key := EncryptionKey; Modifier := StringHashELF(edtUserName2.Text); ApplyModifierToKeyPrim(Modifier, Key, SizeOf(Key)); + Code := Default(TCode); HexToBuffer(edtRegCode2.Text, Code, SizeOf(Code)); if IsRegCodeValid(Key, Code) then begin if IsRegCodeExpired(Key, Code) then @@ -102,7 +107,4 @@ begin edDate.Text := DateToStr(Now, fs); end; -initialization -{$i exreg1.lrs} - end. diff --git a/components/onguard/examples/exrgreg/exrgreg.lpi b/components/onguard/examples/exrgreg/exrgreg.lpi index da48fa0a7..7bb533b16 100644 --- a/components/onguard/examples/exrgreg/exrgreg.lpi +++ b/components/onguard/examples/exrgreg/exrgreg.lpi @@ -57,14 +57,14 @@ - - + + - + @@ -77,6 +77,18 @@ + + + + + + + + + + + + diff --git a/components/onguard/examples/exrgreg/exrgregu.lrs b/components/onguard/examples/exrgreg/exrgregu.lrs deleted file mode 100644 index 37a3a056e..000000000 --- a/components/onguard/examples/exrgreg/exrgregu.lrs +++ /dev/null @@ -1,56 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#252#0#6'Height'#3'4'#1#3'Top'#3#138#0#5'W' - +'idth'#3#237#1#18'HorzScrollBar.Page'#3#236#1#18'VertScrollBar.Page'#3'3'#1#8 - +'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#25'Registration Code' - +' Example'#12'ClientHeight'#3'4'#1#11'ClientWidth'#3#237#1#8'Position'#7#14 - +'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#9'StatusLbl'#22'Anc' - +'horSideLeft.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#8'CloseBtn'#18'A' - +'nchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#15#3'Top'#3#5#1#5 - +'Width'#2' '#20'BorderSpacing.Bottom'#2#12#7'Caption'#6#6'Status'#5'Color'#7 - +#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Contr' - +'ol'#7#7'CodeBtn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Co' - +'ntrol'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#181#0#6 - +'Height'#2#15#3'Top'#2#17#5'Width'#2'H'#18'BorderSpacing.Left'#2'P'#7'Captio' - +'n'#6#13'Current code:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel' - +#7'CodeLbl'#22'AnchorSideLeft.Control'#7#6'Label1'#19'AnchorSideLeft.Side'#7 - +#9'asrBottom'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7 - +#9'asrCenter'#4'Left'#3#21#1#6'Height'#2#15#3'Top'#2#17#5'Width'#2'`'#18'Bor' - +'derSpacing.Left'#2#24#7'Caption'#6#16'0000000000000000'#5'Color'#7#6'clNone' - +#11'ParentColor'#8#0#0#7'TButton'#7'CodeBtn'#22'AnchorSideLeft.Control'#7#5 - +'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#12#6'Height'#2#25#3'T' - +'op'#2#12#5'Width'#2'Y'#20'BorderSpacing.Around'#2#12#25'BorderSpacing.Inner' - +'Border'#2#4#7'Caption'#6#10'Enter Code'#7'OnClick'#7#12'CodeBtnClick'#8'Tab' - +'Order'#2#0#0#0#7'TBitBtn'#8'CloseBtn'#21'AnchorSideTop.Control'#7#6'Bevel1' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner' - +#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#150#1#6'Height'#2#25#3'To' - +'p'#3#0#1#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing' - +'.Top'#2#12#19'BorderSpacing.Right'#2#12#20'BorderSpacing.Bottom'#2#12#4'Kin' - +'d'#7#7'bkClose'#8'TabOrder'#2#1#0#0#7'TButton'#9'RemoveBtn'#21'AnchorSideTo' - +'p.Control'#7#8'CloseBtn'#23'AnchorSideRight.Control'#7#8'CloseBtn'#4'Left'#3 - +'1'#1#6'Height'#2#25#3'Top'#3#0#1#5'Width'#2'a'#7'Anchors'#11#5'akTop'#7'akR' - +'ight'#0#19'BorderSpacing.Right'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Cap' - +'tion'#6#11'Remove Code'#7'OnClick'#7#14'RemoveBtnClick'#8'TabOrder'#2#2#0#0 - +#6'TLabel'#4'Info'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Co' - +'ntrol'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRigh' - +'t.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6 - +'Height'#3#180#0#3'Top'#2'1'#5'Width'#3#213#1#7'Anchors'#11#5'akTop'#6'akLef' - +'t'#7'akRight'#0#20'BorderSpacing.Around'#2#12#7'Caption'#12'Q'#2#0#0'The la' - +'bel at the bottom of this form indicates the status of the code. An invalid' - +' code indicates that the code is either the incorrect type or that none has' - +' been entered. '#13#10#13#10'If the proper code has not been entered or the' - +' ONGUARD.INI file was deleted, the message will say that the code is invali' - +'d.'#13#10#13#10'Use the "Enter Code" button to enter a code (the CODEGEN pr' - +'ogram can be used to generate the proper "Usage" code). '#13#10#13#10'The "' - +'Remove Code" button can be used to remove the entered code from the INI fil' - +'e. Doing so will cause the TOgRegistrationCode component to report that the' - +' code is invalid.'#5'Color'#7#9'clBtnFace'#11'ParentColor'#8#8'WordWrap'#9#0 - +#0#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#4'Info'#21'AnchorSideTop' - +'.Control'#7#4'Info'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRigh' - +'t.Control'#7#4'Info'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6 - +'Height'#2#3#3'Top'#3#241#0#5'Width'#3#213#1#7'Anchors'#11#5'akTop'#6'akLeft' - +#7'akRight'#0#5'Shape'#7#9'bsTopLine'#0#0#19'TOgRegistrationCode'#19'OgRegis' - +'trationCode1'#9'OnChecked'#7#11'CodeChecked'#8'OnGetKey'#7#6'GetKey'#9'OnGe' - +'tCode'#7#7'GetCode'#4'Left'#3#152#0#3'Top'#3#224#0#0#0#0 -]); diff --git a/components/onguard/examples/exrgreg/exrgregu.pas b/components/onguard/examples/exrgreg/exrgregu.pas index ff02f1e71..25e11d81b 100644 --- a/components/onguard/examples/exrgreg/exrgregu.pas +++ b/components/onguard/examples/exrgreg/exrgregu.pas @@ -5,8 +5,8 @@ unit exrgregu; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Buttons,LResources, ExtCtrls,OnGuard, IniFiles, OgUtil; + SysUtils, Classes,Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil; type @@ -39,7 +39,10 @@ var implementation +{$R *.lfm} +uses + IniFiles; procedure TForm1.CodeChecked(Sender: TObject; Status: TCodeStatus); var @@ -99,6 +102,7 @@ begin Ini := TIniFile.Create('ONGUARD.INI'); try {store the code in the ini file if it looks OK} + Work := Default(TCode); if HexToBuffer(S, Work, SizeOf(Work)) then begin {save the value} Ini.WriteString('Codes', 'RegistrationCode', S); @@ -132,7 +136,4 @@ begin end; -initialization -{$i exrgregu.lrs} - end. diff --git a/components/onguard/examples/exrgstr/exrgstr.lpi b/components/onguard/examples/exrgstr/exrgstr.lpi index 0e8c0efac..7df0b6b4b 100644 --- a/components/onguard/examples/exrgstr/exrgstr.lpi +++ b/components/onguard/examples/exrgstr/exrgstr.lpi @@ -45,7 +45,7 @@ - + @@ -59,14 +59,14 @@ - - + + - + @@ -102,6 +102,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/onguard/examples/exrgstr/exrgstru.lrs b/components/onguard/examples/exrgstr/exrgstru.lrs deleted file mode 100644 index 5e31993e8..000000000 --- a/components/onguard/examples/exrgstr/exrgstru.lrs +++ /dev/null @@ -1,31 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'-'#1#6'Height'#3#192#0#3'Top'#3#218#0#5'W' - +'idth'#3#6#1#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#5'Form1'#12'ClientHe' - +'ight'#3#192#0#11'ClientWidth'#3#6#1#10'Font.Color'#7#7'clBlack'#8'Position' - +#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#6'Label1'#22'A' - +'nchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21 - +'AnchorSideTop.Control'#7#5'Memo1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'L' - +'eft'#2'_'#6'Height'#2#15#3'Top'#2'g'#5'Width'#2'H'#9'Alignment'#7#8'taCente' - +'r'#17'BorderSpacing.Top'#2#6#7'Caption'#6#14'Registered to:'#11'ParentColor' - +#8#0#0#5'TMemo'#5'Memo1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSide' - +'Top.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSid' - +'eRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2'O'#3'Top'#2#12#5'Width' - +#3#238#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'BorderSpacing.Arou' - +'nd'#2#12#13'Lines.Strings'#1#6':If you can edit this, then your program was' - +' allowed to run'#0#10'ScrollBars'#7#10'ssVertical'#8'TabOrder'#2#0#0#0#7'TB' - +'itBtn'#8'CloseBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.' - +'Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#6'Bevel1'#18'AnchorSideTop' - +'.Side'#7#9'asrBottom'#4'Left'#2'l'#6'Height'#2#26#3'Top'#3#143#0#5'Width'#2 - +'.'#8'AutoSize'#9#17'BorderSpacing.Top'#2#10#20'BorderSpacing.Bottom'#2#12#4 - +'Kind'#7#7'bkClose'#8'TabOrder'#2#1#0#0#6'TBevel'#6'Bevel1'#22'AnchorSideLef' - +'t.Control'#7#5'Memo1'#21'AnchorSideTop.Control'#7#6'Label1'#18'AnchorSideTo' - +'p.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Memo1'#20'AnchorSide' - +'Right.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2#3#3'Top'#3#130#0#5'Widt' - +'h'#3#238#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.T' - +'op'#2#12#5'Shape'#7#9'bsTopLine'#0#0#19'TOgRegistrationCode'#19'OgRegistrat' - +'ionCode1'#9'OnChecked'#7#26'OgRegistrationCode1Checked'#8'OnGetKey'#7#25'Og' - +'RegistrationCode1GetKey'#9'OnGetCode'#7#26'OgRegistrationCode1GetCode'#4'Le' - +'ft'#2'h'#3'Top'#2'('#0#0#0 -]); diff --git a/components/onguard/examples/exrgstr/exrgstru.pas b/components/onguard/examples/exrgstr/exrgstru.pas index f84eb9745..c167c412f 100644 --- a/components/onguard/examples/exrgstr/exrgstru.pas +++ b/components/onguard/examples/exrgstr/exrgstru.pas @@ -4,11 +4,8 @@ unit Exrgstru; interface uses - SysUtils,Classes,Controls, - Forms, Dialogs, OnGuard, StdCtrls, Buttons,LResources, - - OgUtil, - IniFiles; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + IniFiles, OnGuard, OgUtil; const CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8, @@ -19,6 +16,7 @@ type { TForm1 } TForm1 = class(TForm) + Bevel1: TBevel; Memo1: TMemo; CloseBtn: TBitBtn; OgRegistrationCode1: TOgRegistrationCode; @@ -43,7 +41,7 @@ var implementation - +{$R *.lfm} {=======================================================================} @@ -55,15 +53,8 @@ end; {=======================================================================} procedure TForm1.OgRegistrationCode1GetCode(Sender: TObject; var Code: TCode); -var - L : integer; begin TheDir := ExtractFilePath(ParamStr(0)); -{ - L := Length(TheDir); - if (L > 3) and (TheDir[L] <> '\') then - TheDir := TheDir + '\'; - } if FileExists(TheDir + 'RegCode.ini') then begin IniFile := TIniFile.Create(TheDir + 'RegCode.ini'); @@ -91,6 +82,7 @@ begin case Status of ogValidCode : begin + TC := Default(TCode); InitRegCode(CKey, ARegStr, ED, TC); C1 := BufferToHex(TC, SizeOf(TC)); @@ -139,7 +131,4 @@ begin end; -initialization -{$i exrgstru.lrs} - end. diff --git a/components/onguard/examples/exselapi/exselap1.lrs b/components/onguard/examples/exselapi/exselap1.lrs deleted file mode 100644 index 963603151..000000000 --- a/components/onguard/examples/exselapi/exselap1.lrs +++ /dev/null @@ -1,33 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#150#1#6'Height'#3'%'#1#3'Top'#3'B'#1#5'Wi' - +'dth'#3'e'#1#8'AutoSize'#9#7'Caption'#6#10'ExSelAPI: '#12'ClientHeight'#3'%' - +#1#11'ClientWidth'#3'e'#1#4'Menu'#7#9'MainMenu1'#8'OnCreate'#7#10'FormCreate' - +#10'LCLVersion'#6#7'2.3.0.0'#0#7'TButton'#9'ModifyBtn'#22'AnchorSideLeft.Con' - +'trol'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Co' - +'ntrol'#7#4'Info'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'z'#6'Heigh' - +'t'#2#25#3'Top'#3#242#0#5'Width'#2'q'#20'BorderSpacing.Bottom'#2#16#25'Borde' - +'rSpacing.InnerBorder'#2#4#7'Caption'#6#15'Modify Features'#7'OnClick'#7#14 - +'ModifyBtnClick'#8'TabOrder'#2#0#0#0#6'TLabel'#4'Info'#22'AnchorSideLeft.Con' - +'trol'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Co' - +'ntrol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#16#6'He' - +'ight'#3#210#0#3'Top'#2#16#5'Width'#3'E'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7 - +'akRight'#0#20'BorderSpacing.Around'#2#16#7'Caption'#12'&'#2#0#0'This exampl' - +'e uses the OgUsageCode and the OgSpecialCode (via OnGuard API functions) to' - +' implement a limited use "demo" application which allows only the required ' - +'features.'#13#10#13#10'The program can be run 3 times and then a special co' - +'de st be obtained to register the program and to enable various features. ' - +#13#10#13#10'A machine modifier is used to prevent the application from bein' - +'g copied and run on another machine. '#13#10#13#10'To obtain the release co' - +'de you need to run the companion example EXSLCODE. The release codes will b' - +'e stored in a data file called EXSELECT.DAT'#5'Color'#7#6'clAqua'#11'Parent' - +'Color'#8#8'WordWrap'#9#0#0#9'TMainMenu'#9'MainMenu1'#4'Left'#2' '#3'Top'#3 - +#168#0#0#9'TMenuItem'#12'FeaturesMenu'#7'Caption'#6#8'Features'#0#9'TMenuIte' - +'m'#16'FeaturesRequired'#7'Caption'#6#8'Required'#7'Checked'#9#0#0#9'TMenuIt' - +'em'#12'FeaturesHelp'#7'Caption'#6#4'Help'#7'Enabled'#8#0#0#9'TMenuItem'#16 - +'FeaturesExamples'#7'Caption'#6#8'Examples'#7'Enabled'#8#0#0#9'TMenuItem'#16 - +'FeaturesDatabase'#7'Caption'#6#8'Database'#7'Enabled'#8#0#0#9'TMenuItem'#11 - +'FeaturesFax'#7'Caption'#6#3'Fax'#7'Enabled'#8#0#0#9'TMenuItem'#15'FeaturesG' - +'oodies'#7'Caption'#6#7'Goodies'#7'Enabled'#8#0#0#0#0#0 -]); diff --git a/components/onguard/examples/exselapi/exselap1.pas b/components/onguard/examples/exselapi/exselap1.pas index fe4e251cf..e7f289e2f 100644 --- a/components/onguard/examples/exselapi/exselap1.pas +++ b/components/onguard/examples/exselapi/exselap1.pas @@ -21,8 +21,8 @@ unit Exselap1; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Menus,Buttons,LResources,OgUtil,OnGuard; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Menus, Buttons, + OgUtil, OnGuard; type @@ -54,16 +54,16 @@ var implementation - +{$R *.lfm} const - { The key was created by a separate program (CODEGEN) and is generic - the examples, EXSELECT, EXSELAPI, and EXSLCODE } + { The key was created by a separate program (CODEGEN) and is generic + the examples, EXSELECT, EXSELAPI, and EXSLCODE } TheKey: TKey = ($F1,$46,$8D,$E4,$70,$AE,$92,$DC, $13,$1A,$03,$C4,$44,$25,$72,$F5); - { Initial code has 3 uses embedded } - InitCode : string = '13B1A08BD78AFCD3'; + { Initial code has 3 uses embedded } + InitCode : string = '13B1A08BD78AFCD3'; CodeFile : string = 'ExSelect.Dat'; DemoCaption : string = 'ExSelApi: Demo runs left = '; RegisteredCap : string = 'ExSelApi: Registered'; @@ -246,7 +246,4 @@ begin end; -initialization -{$i exselap1.lrs} - end. diff --git a/components/onguard/examples/exselapi/exselapi.lpi b/components/onguard/examples/exselapi/exselapi.lpi index 7555c3341..bcbf5e843 100644 --- a/components/onguard/examples/exselapi/exselapi.lpi +++ b/components/onguard/examples/exselapi/exselapi.lpi @@ -59,8 +59,8 @@ - - + + @@ -108,7 +108,7 @@ - + @@ -136,6 +136,22 @@ + + + + + + + + + + + + + + + + @@ -166,21 +182,14 @@ - + - - - - - - - - + diff --git a/components/onguard/examples/exselect/exselec1.lrs b/components/onguard/examples/exselect/exselec1.lrs deleted file mode 100644 index 2de65d897..000000000 --- a/components/onguard/examples/exselect/exselec1.lrs +++ /dev/null @@ -1,41 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#31#1#6'Height'#3#18#1#3'Top'#2'f'#5'Width' - +#3'q'#1#18'HorzScrollBar.Page'#3'p'#1#18'VertScrollBar.Page'#3#249#0#8'AutoS' - +'ize'#9#7'Caption'#6#10'ExSelect: '#12'ClientHeight'#3#18#1#11'ClientWidth'#3 - +'q'#1#4'Menu'#7#9'MainMenu1'#8'OnCreate'#7#10'FormCreate'#10'LCLVersion'#6#7 - +'2.3.0.0'#0#7'TButton'#9'ModifyBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#19 - +'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#4'Info'#18 - +'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#128#0#6'Height'#2#25#3'Top'#3 - +#227#0#5'Width'#2'q'#20'BorderSpacing.Bottom'#2#16#25'BorderSpacing.InnerBor' - +'der'#2#4#7'Caption'#6#15'Modify Features'#7'Enabled'#8#7'OnClick'#7#14'Modi' - +'fyBtnClick'#8'TabOrder'#2#0#0#0#6'TLabel'#4'Info'#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#16#6'Height'#3 - +#195#0#3'Top'#2#16#5'Width'#3'Q'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRigh' - +'t'#0#20'BorderSpacing.Around'#2#16#7'Caption'#12'!'#2#0#0'This example uses' - +' the TOgUsageCode and the TOgSpecialCode components to implement a limited ' - +'use "demo" application which allows only the required features. '#13#10#13 - +#10'The program can be run 3 times and then a special code must be obtained' - +' to register the program and to enable various features. '#13#10#13#10'A ma' - +'chine modifier is used to prevent the application from being copied and run' - +' on another machine. To obtain the release release code you need to run th' - +'e companion example EXSLCODE. The release codes will be stored in a data fi' - +'le called EXSELECT.DAT'#5'Color'#7#6'clAqua'#11'ParentColor'#8#8'WordWrap'#9 - +#0#0#9'TMainMenu'#9'MainMenu1'#4'Left'#2'('#3'Top'#3#200#0#0#9'TMenuItem'#12 - +'FeaturesMenu'#7'Caption'#6#8'Features'#0#9'TMenuItem'#16'FeaturesRequired'#7 - +'Caption'#6#8'Required'#7'Checked'#9#0#0#9'TMenuItem'#12'FeaturesHelp'#7'Cap' - +'tion'#6#4'Help'#7'Enabled'#8#0#0#9'TMenuItem'#16'FeaturesExamples'#7'Captio' - +'n'#6#8'Examples'#7'Enabled'#8#0#0#9'TMenuItem'#16'FeaturesDatabase'#7'Capti' - +'on'#6#8'Database'#7'Enabled'#8#0#0#9'TMenuItem'#11'FeaturesFax'#7'Caption'#6 - +#3'Fax'#7'Enabled'#8#0#0#9'TMenuItem'#15'FeaturesGoodies'#7'Caption'#6#7'Goo' - +'dies'#7'Enabled'#8#0#0#0#0#12'TOgUsageCode'#12'OgUsageCode1'#9'AutoCheck'#8 - +#9'OnChecked'#7#19'OgUsageCode1Checked'#8'OnGetKey'#7#18'OgUsageCode1GetKey' - +#9'OnGetCode'#7#19'OgUsageCode1GetCode'#12'AutoDecrease'#8#12'OnChangeCode'#7 - +#22'OgUsageCode1ChangeCode'#4'Left'#3#168#0#3'Top'#2'0'#0#0#14'TOgSpecialCod' - +'e'#14'OgSpecialCode1'#9'AutoCheck'#8#9'OnChecked'#7#21'OgSpecialCode1Checke' - +'d'#8'OnGetKey'#7#20'OgSpecialCode1GetKey'#9'OnGetCode'#7#21'OgSpecialCode1G' - +'etCode'#13'OnGetModifier'#7#25'OgSpecialCode1GetModifier'#4'Left'#3#168#0#3 - +'Top'#2#16#0#0#0 -]); diff --git a/components/onguard/examples/exselect/exselec1.pas b/components/onguard/examples/exselect/exselec1.pas index 0dd57b981..92941db81 100644 --- a/components/onguard/examples/exselect/exselec1.pas +++ b/components/onguard/examples/exselect/exselec1.pas @@ -21,8 +21,8 @@ unit Exselec1; interface uses - SysUtils, Classes, Controls, Forms, Dialogs, - StdCtrls, OnGuard, OgUtil, Menus,Buttons,LResources; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Menus, Buttons, + OnGuard, OgUtil; type @@ -65,7 +65,7 @@ var implementation - +{$R *.lfm} const { The key was created by a separate program (CODEGEN) and is generic @@ -324,7 +324,4 @@ begin end; end; -initialization -{$i exselec1.lrs} - end. diff --git a/components/onguard/examples/exselect/exselect.lpi b/components/onguard/examples/exselect/exselect.lpi index ecac86c72..d3b6fa13a 100644 --- a/components/onguard/examples/exselect/exselect.lpi +++ b/components/onguard/examples/exselect/exselect.lpi @@ -58,8 +58,8 @@ - - + + @@ -70,7 +70,7 @@ - + @@ -79,6 +79,14 @@ + + + + + + + + diff --git a/components/onguard/examples/exslcode/exslcod1.lrs b/components/onguard/examples/exslcode/exslcod1.lrs deleted file mode 100644 index a8c33e712..000000000 --- a/components/onguard/examples/exslcode/exslcod1.lrs +++ /dev/null @@ -1,56 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#237#0#6'Height'#3#243#0#3'Top'#3#152#0#5 - +'Width'#3' '#1#18'HorzScrollBar.Page'#3#31#1#18'VertScrollBar.Page'#3#242#0 - +#13'ActiveControl'#7#9'MachineID'#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog' - +#7'Caption'#6#24' Special Code Generator '#12'ClientHeight'#3#243#0#11'Clien' - +'tWidth'#3' '#1#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#6'Label1'#22'AnchorS' - +'ideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control'#7#9'MachineID'#18 - +'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#16#6'Height'#2#15#3'Top'#2#20#5 - +'Width'#2'<'#7'Caption'#6#10'Machine ID'#5'Color'#7#6'clNone'#11'ParentColor' - +#8#0#0#7'TButton'#6'GenBtn'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#19'Anc' - +'horSideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#9'GroupBox1'#18 - +'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'U'#6'Height'#2#25#3'Top'#3#161 - +#0#5'Width'#2'`'#17'BorderSpacing.Top'#2#16#20'BorderSpacing.Bottom'#2#8#25 - +'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#13'Generate Code'#7'OnClick'#7 - +#11'GenBtnClick'#8'TabOrder'#2#1#0#0#5'TEdit'#9'MachineID'#22'AnchorSideLeft' - +'.Control'#7#6'Label1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideT' - +'op.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#9'GroupBox1'#20'Anchor' - +'SideRight.Side'#7#9'asrBottom'#4'Left'#2'\'#6'Height'#2#23#3'Top'#2#16#5'Wi' - +'dth'#3#158#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing' - +'.Left'#2#16#17'BorderSpacing.Top'#2#16#9'MaxLength'#2#8#8'TabOrder'#2#0#0#0 - +#9'TGroupBox'#9'GroupBox1'#22'AnchorSideLeft.Control'#7#5'Owner'#4'Left'#2#16 - +#6'Height'#2'Y'#3'Top'#2'8'#5'Width'#3#234#0#8'AutoSize'#9#18'BorderSpacing.' - +'Left'#2#16#19'BorderSpacing.Right'#2#16#7'Caption'#6#8'Features'#12'ClientH' - +'eight'#2'E'#11'ClientWidth'#3#230#0#8'TabOrder'#2#2#0#9'TCheckBox'#7'ReqFea' - +'t'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control'#7#9 - +'GroupBox1'#4'Left'#2' '#6'Height'#2#19#3'Top'#2#0#5'Width'#2'A'#18'BorderSp' - +'acing.Left'#2' '#7'Caption'#6#8'Required'#7'Checked'#9#7'Enabled'#8#5'State' - +#7#9'cbChecked'#8'TabOrder'#2#0#0#0#9'TCheckBox'#8'HelpFeat'#22'AnchorSideLe' - +'ft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control'#7#7'ReqFeat'#18'Anchor' - +'SideTop.Side'#7#9'asrBottom'#4'Left'#2' '#6'Height'#2#19#3'Top'#2#19#5'Widt' - +'h'#2'+'#18'BorderSpacing.Left'#2' '#7'Caption'#6#4'Help'#8'TabOrder'#2#1#0#0 - +#9'TCheckBox'#12'ExamplesFeat'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21 - +'AnchorSideTop.Control'#7#8'HelpFeat'#18'AnchorSideTop.Side'#7#9'asrBottom'#4 - +'Left'#2' '#6'Height'#2#19#3'Top'#2'&'#5'Width'#2'D'#18'BorderSpacing.Left'#2 - +' '#20'BorderSpacing.Bottom'#2#12#7'Caption'#6#8'Examples'#8'TabOrder'#2#2#0 - +#0#9'TCheckBox'#6'DBFeat'#22'AnchorSideLeft.Control'#7#12'ExamplesFeat'#19'A' - +'nchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#7'ReqFeat'#4 - +'Left'#3#132#0#6'Height'#2#19#3'Top'#2#0#5'Width'#2'B'#18'BorderSpacing.Left' - +#2' '#19'BorderSpacing.Right'#2' '#7'Caption'#6#8'Database'#8'TabOrder'#2#3#0 - +#0#9'TCheckBox'#7'FaxFeat'#22'AnchorSideLeft.Control'#7#12'ExamplesFeat'#19 - +'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#8'HelpFeat' - +#4'Left'#3#132#0#6'Height'#2#19#3'Top'#2#19#5'Width'#2'$'#18'BorderSpacing.L' - +'eft'#2' '#7'Caption'#6#3'Fax'#8'TabOrder'#2#4#0#0#9'TCheckBox'#11'GoodiesFe' - +'at'#22'AnchorSideLeft.Control'#7#12'ExamplesFeat'#19'AnchorSideLeft.Side'#7 - +#9'asrBottom'#21'AnchorSideTop.Control'#7#12'ExamplesFeat'#4'Left'#3#132#0#6 - +'Height'#2#19#3'Top'#2'&'#5'Width'#2'='#18'BorderSpacing.Left'#2' '#19'Borde' - +'rSpacing.Right'#2' '#7'Caption'#6#7'Goodies'#8'TabOrder'#2#5#0#0#0#5'TEdit' - +#11'CodeDisplay'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.' - +'Control'#7#6'GenBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRig' - +'ht.Control'#7#9'GroupBox1'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2 - +#16#6'Height'#2#23#3'Top'#3#194#0#5'Width'#3#234#0#7'Anchors'#11#5'akTop'#6 - +'akLeft'#7'akRight'#0#20'BorderSpacing.Bottom'#2#16#5'Color'#7#6'clAqua'#8'T' - +'abOrder'#2#3#0#0#0 -]); diff --git a/components/onguard/examples/exslcode/exslcod1.pas b/components/onguard/examples/exslcode/exslcod1.pas index 5ecb3d7f8..9a53e82cd 100644 --- a/components/onguard/examples/exslcode/exslcod1.pas +++ b/components/onguard/examples/exslcode/exslcod1.pas @@ -18,8 +18,8 @@ unit Exslcod1; interface uses - SysUtils, Classes, Controls, Forms, Dialogs,Buttons, - OnGuard, OgUtil, StdCtrls,LResources{, Mask}; + SysUtils, Classes, Controls, Forms, Dialogs, Buttons, StdCtrls, + OnGuard, OgUtil; type @@ -49,7 +49,7 @@ var implementation - +{$R *.lfm} const DemoKey: TKey = ($F1,$46,$8D,$E4, @@ -67,7 +67,7 @@ const procedure TForm1.GenBtnClick(Sender: TObject); var Key: TKey; - Modifier: Longint; + Modifier: Longint = 0; Code: TCode; Expires: TDateTime; Value: longint; @@ -87,11 +87,9 @@ begin Value := Value + FaxMask; If GoodiesFeat.Checked then Value := Value + GoodiesMask; + Code := Default(TCode); InitSpecialCode(Key, Value, Expires, Code); CodeDisplay.Text := BufferToHex(Code, SizeOf(Code)); end; -initialization -{$i exslcod1.lrs} - end. diff --git a/components/onguard/examples/exslcode/exslcode.lpi b/components/onguard/examples/exslcode/exslcode.lpi index 62d1d632a..335cb4c37 100644 --- a/components/onguard/examples/exslcode/exslcode.lpi +++ b/components/onguard/examples/exslcode/exslcode.lpi @@ -59,8 +59,8 @@ - - + + @@ -72,7 +72,7 @@ - + @@ -85,6 +85,22 @@ + + + + + + + + + + + + + + + + diff --git a/components/onguard/examples/exsnreg/exsnreg.lpi b/components/onguard/examples/exsnreg/exsnreg.lpi index ae49781d1..f626ec407 100644 --- a/components/onguard/examples/exsnreg/exsnreg.lpi +++ b/components/onguard/examples/exsnreg/exsnreg.lpi @@ -60,14 +60,13 @@ - - + - + @@ -80,6 +79,18 @@ + + + + + + + + + + + + diff --git a/components/onguard/examples/exsnreg/exsnregu.lrs b/components/onguard/examples/exsnreg/exsnregu.lrs deleted file mode 100644 index 1c3b19bd3..000000000 --- a/components/onguard/examples/exsnreg/exsnregu.lrs +++ /dev/null @@ -1,56 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#252#0#6'Height'#3'0'#1#3'Top'#3#138#0#5'W' - +'idth'#3#239#1#18'HorzScrollBar.Page'#3#238#1#18'VertScrollBar.Page'#3'/'#1#8 - +'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#26'Serial Number Cod' - +'e Example'#12'ClientHeight'#3'0'#1#11'ClientWidth'#3#239#1#8'Position'#7#14 - +'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#9'StatusLbl'#22'Anc' - +'horSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#8'CloseBtn'#18 - +'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#15#3'Top'#3#245#0 - +#5'Width'#2' '#18'BorderSpacing.Left'#2#8#7'Caption'#6#6'Status'#5'Color'#7#6 - +'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control' - +#7#7'CodeBtn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Contro' - +'l'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#177#0#6'Hei' - +'ght'#2#15#3'Top'#2#13#5'Width'#2'H'#18'BorderSpacing.Left'#2'P'#7'Caption'#6 - +#13'Current code:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#7'Co' - +'deLbl'#22'AnchorSideLeft.Control'#7#6'Label1'#19'AnchorSideLeft.Side'#7#9'a' - +'srBottom'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9 - +'asrCenter'#4'Left'#3#1#1#6'Height'#2#15#3'Top'#2#13#5'Width'#2'`'#18'Border' - +'Spacing.Left'#2#8#7'Caption'#6#16'0000000000000000'#5'Color'#7#6'clNone'#11 - +'ParentColor'#8#0#0#7'TButton'#7'CodeBtn'#22'AnchorSideLeft.Control'#7#5'Own' - +'er'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#8#6'Height'#2#25#3'Top'#2 - +#8#5'Width'#2'Y'#20'BorderSpacing.Around'#2#8#25'BorderSpacing.InnerBorder'#2 - +#4#7'Caption'#6#10'Enter Code'#7'OnClick'#7#12'CodeBtnClick'#8'TabOrder'#2#0 - +#0#0#7'TBitBtn'#8'CloseBtn'#21'AnchorSideTop.Control'#7#6'Bevel1'#18'AnchorS' - +'ideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'Ancho' - +'rSideRight.Side'#7#9'asrBottom'#4'Left'#3#156#1#6'Height'#2#25#3'Top'#3#240 - +#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2 - +#8#19'BorderSpacing.Right'#2#8#20'BorderSpacing.Bottom'#2#8#4'Kind'#7#7'bkCl' - +'ose'#8'TabOrder'#2#1#0#0#7'TButton'#9'RemoveBtn'#21'AnchorSideTop.Control'#7 - +#8'CloseBtn'#23'AnchorSideRight.Control'#7#8'CloseBtn'#4'Left'#3'7'#1#6'Heig' - +'ht'#2#25#3'Top'#3#240#0#5'Width'#2'a'#7'Anchors'#11#5'akTop'#7'akRight'#0#19 - +'BorderSpacing.Right'#2#4#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#11 - +'Remove Code'#7'OnClick'#7#14'RemoveBtnClick'#8'TabOrder'#2#2#0#0#6'TLabel'#4 - +'Info'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#7'C' - +'odeBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7 - +#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#3#180 - +#0#3'Top'#2')'#5'Width'#3#223#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0 - +#20'BorderSpacing.Around'#2#8#7'Caption'#12'Q'#2#0#0'The label at the bottom' - +' of this form indicates the status of the code. An invalid code indicates t' - +'hat the code is either the incorrect type or that none has been entered. ' - +#13#10#13#10'If the proper code has not been entered or the ONGUARD.INI file' - +' was deleted, the message will say that the code is invalid.'#13#10#13#10'U' - +'se the "Enter Code" button to enter a code (the CODEGEN program can be used' - +' to generate the proper "Usage" code). '#13#10#13#10'The "Remove Code" butt' - +'on can be used to remove the entered code from the INI file. Doing so will ' - +'cause the TOgSerialNumberCode component to report that the code is invalid.' - +#5'Color'#7#9'clBtnFace'#11'ParentColor'#8#8'WordWrap'#9#0#0#6'TBevel'#6'Bev' - +'el1'#22'AnchorSideLeft.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#4'Inf' - +'o'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#4'In' - +'fo'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#3#3'Top' - +#3#229#0#5'Width'#3#223#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#5'Sh' - +'ape'#7#9'bsTopLine'#0#0#19'TOgSerialNumberCode'#19'OgSerialNumberCode1'#9'O' - +'nChecked'#7#11'CodeChecked'#8'OnGetKey'#7#6'GetKey'#9'OnGetCode'#7#7'GetCod' - +'e'#4'Left'#3#168#0#3'Top'#3#216#0#0#0#0 -]); diff --git a/components/onguard/examples/exsnreg/exsnregu.pas b/components/onguard/examples/exsnreg/exsnregu.pas index 0e886012e..c587ac2a3 100644 --- a/components/onguard/examples/exsnreg/exsnregu.pas +++ b/components/onguard/examples/exsnreg/exsnregu.pas @@ -4,8 +4,8 @@ unit Exsnregu; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Buttons,LResources, ExtCtrls, OnGuard, IniFiles, OgUtil; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil; type @@ -36,8 +36,10 @@ var Form1: TForm1; implementation +{$R *.lfm} - +uses + IniFiles; procedure TForm1.CodeChecked(Sender: TObject; Status: TCodeStatus); var @@ -95,6 +97,7 @@ begin Ini := TIniFile.Create('ONGUARD.INI'); try {store the code in the ini file if it looks OK} + Work := Default(TCode); if HexToBuffer(S, Work, SizeOf(Work)) then begin {save the value} Ini.WriteString('Codes', 'SerialNumberCode', S); @@ -125,7 +128,4 @@ begin end; -initialization -{$i exsnregu.lrs} - end. diff --git a/components/onguard/examples/exspname/exspname.lpi b/components/onguard/examples/exspname/exspname.lpi index 73330b4dc..684a445a6 100644 --- a/components/onguard/examples/exspname/exspname.lpi +++ b/components/onguard/examples/exspname/exspname.lpi @@ -56,7 +56,8 @@ - + + @@ -75,11 +76,23 @@ - + + + + + + + + + + + + + diff --git a/components/onguard/examples/exspname/exspnamu.lrs b/components/onguard/examples/exspname/exspnamu.lrs deleted file mode 100644 index 9c1d55629..000000000 --- a/components/onguard/examples/exspname/exspnamu.lrs +++ /dev/null @@ -1,66 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#200#0#6'Height'#3''''#1#3'Top'#2'l'#5'Wid' - +'th'#3't'#1#18'HorzScrollBar.Page'#3's'#1#18'VertScrollBar.Page'#3'&'#1#8'Au' - +'toSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6')Build/Check Special C' - +'ode with Name string'#12'ClientHeight'#3''''#1#11'ClientWidth'#3't'#1#10'LC' - +'LVersion'#6#7'2.3.0.0'#0#9'TGroupBox'#9'GroupBox1'#22'AnchorSideLeft.Contro' - +'l'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#12#6'Height'#2 - +'W'#3'Top'#2#12#5'Width'#3'V'#1#20'BorderSpacing.Around'#2#12#7'Caption'#6#19 - +' Generate the Code '#12'ClientHeight'#2'C'#11'ClientWidth'#3'R'#1#8'TabOrde' - +'r'#2#0#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'A' - +'nchorSideTop.Control'#7#12'edtUserName1'#18'AnchorSideTop.Side'#7#9'asrCent' - +'er'#4'Left'#2#16#6'Height'#2#15#3'Top'#2#8#5'Width'#2':'#18'BorderSpacing.L' - +'eft'#2#16#7'Caption'#6#9'User Name'#5'Color'#7#6'clNone'#11'ParentColor'#8#0 - +#0#5'TEdit'#12'edtUserName1'#22'AnchorSideLeft.Control'#7#8'edtCode1'#21'Anc' - +'horSideTop.Control'#7#9'GroupBox1'#23'AnchorSideRight.Control'#7#9'GroupBox' - +'1'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'f'#6'Height'#2#23#3'To' - +'p'#2#4#5'Width'#3#224#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'Bo' - +'rderSpacing.Top'#2#4#19'BorderSpacing.Right'#2#12#8'TabOrder'#2#0#0#0#7'TBu' - +'tton'#10'btnGenCode'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSid' - +'eTop.Control'#7#8'edtCode1'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2 - +#8#6'Height'#2#25#3'Top'#2'"'#5'Width'#2'V'#20'BorderSpacing.Around'#2#8#25 - +'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#8'Gen Code'#7'OnClick'#7#15'btn' - +'GenCodeClick'#8'TabOrder'#2#1#0#0#5'TEdit'#8'edtCode1'#22'AnchorSideLeft.Co' - +'ntrol'#7#10'btnGenCode'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSid' - +'eTop.Control'#7#12'edtUserName1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'A' - +'nchorSideRight.Control'#7#9'GroupBox1'#20'AnchorSideRight.Side'#7#9'asrBott' - +'om'#4'Left'#2'f'#6'Height'#2#23#3'Top'#2'#'#5'Width'#3#224#0#7'Anchors'#11#5 - +'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#8#19'BorderSpacing.Ri' - +'ght'#2#12#8'ReadOnly'#9#8'TabOrder'#2#2#0#0#0#9'TGroupBox'#9'GroupBox2'#22 - +'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'GroupBox1' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'Group' - +'Box1'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2't'#3 - +'Top'#2'o'#5'Width'#3'V'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18 - +'BorderSpacing.Left'#2#12#17'BorderSpacing.Top'#2#12#20'BorderSpacing.Bottom' - +#2#12#7'Caption'#6#16' Check the Code '#12'ClientHeight'#2'`'#11'ClientWidth' - +#3'R'#1#8'TabOrder'#2#1#0#6'TLabel'#6'Label2'#22'AnchorSideLeft.Control'#7#9 - +'GroupBox2'#21'AnchorSideTop.Control'#7#12'edtUserName2'#18'AnchorSideTop.Si' - +'de'#7#9'asrCenter'#4'Left'#2#16#6'Height'#2#15#3'Top'#2#8#5'Width'#2':'#18 - +'BorderSpacing.Left'#2#16#7'Caption'#6#9'User Name'#5'Color'#7#6'clNone'#11 - +'ParentColor'#8#0#0#6'TLabel'#6'Label3'#22'AnchorSideLeft.Control'#7#9'Group' - +'Box2'#21'AnchorSideTop.Control'#7#8'edtCode2'#18'AnchorSideTop.Side'#7#9'as' - +'rCenter'#4'Left'#2#16#6'Height'#2#15#3'Top'#2''''#5'Width'#2#28#18'BorderSp' - +'acing.Left'#2#16#7'Caption'#6#4'Code'#5'Color'#7#6'clNone'#11'ParentColor'#8 - +#0#0#6'TLabel'#14'lblCheckResult'#22'AnchorSideLeft.Control'#7#12'edtUserNam' - +'e2'#21'AnchorSideTop.Control'#7#8'edtCode2'#18'AnchorSideTop.Side'#7#9'asrB' - +'ottom'#4'Left'#2'e'#6'Height'#2#15#3'Top'#2'D'#5'Width'#2'N'#17'BorderSpaci' - +'ng.Top'#2#10#7'Caption'#6#14'lblCheckResult'#5'Color'#7#6'clNone'#11'Parent' - +'Color'#8#0#0#5'TEdit'#12'edtUserName2'#22'AnchorSideLeft.Control'#7#12'btnC' - +'heckCode'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7 - +#9'GroupBox2'#23'AnchorSideRight.Control'#7#9'GroupBox2'#20'AnchorSideRight.' - +'Side'#7#9'asrBottom'#4'Left'#2'e'#6'Height'#2#23#3'Top'#2#4#5'Width'#3#225#0 - +#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#4#19 - +'BorderSpacing.Right'#2#12#8'TabOrder'#2#0#0#0#5'TEdit'#8'edtCode2'#22'Ancho' - +'rSideLeft.Control'#7#12'edtUserName2'#21'AnchorSideTop.Control'#7#12'edtUse' - +'rName2'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7 - +#9'GroupBox2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'e'#6'Height' - +#2#23#3'Top'#2'#'#5'Width'#3#225#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRigh' - +'t'#0#17'BorderSpacing.Top'#2#8#19'BorderSpacing.Right'#2#12#8'TabOrder'#2#1 - +#0#0#7'TButton'#12'btnCheckCode'#22'AnchorSideLeft.Control'#7#9'GroupBox2'#21 - +'AnchorSideTop.Control'#7#14'lblCheckResult'#18'AnchorSideTop.Side'#7#9'asrC' - +'enter'#4'Left'#2#8#6'Height'#2#25#3'Top'#2'?'#5'Width'#2'U'#20'BorderSpacin' - +'g.Around'#2#8#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#10'Check Code' - +#7'OnClick'#7#17'btnCheckCodeClick'#8'TabOrder'#2#2#0#0#0#0 -]); diff --git a/components/onguard/examples/exspname/exspnamu.pas b/components/onguard/examples/exspname/exspnamu.pas index 098a9329a..1db2f5845 100644 --- a/components/onguard/examples/exspname/exspnamu.pas +++ b/components/onguard/examples/exspname/exspnamu.pas @@ -3,8 +3,7 @@ unit ExSpNamu; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls,Buttons,LResources; + SysUtils, Classes,Controls, Forms, Dialogs, StdCtrls, Buttons; type @@ -36,7 +35,7 @@ var implementation - +{$R *.lfm} uses OnGuard, OgUtil; @@ -53,6 +52,7 @@ var Code : TCode; begin HashValue := StringHashElf(edtUserName1.Text); + Code := Default(TCode); InitSpecialCode(Key, HashValue, Now + 30, Code); edtCode1.Text := BufferToHex(Code, SizeOf(Code)); end; @@ -60,9 +60,9 @@ end; { check unlocking code against a user name } procedure TForm1.btnCheckCodeClick(Sender: TObject); var - HashValue : Longint; Code : TCode; begin + Code := Default(TCode); HexToBuffer(edtCode2.Text, Code, SizeOf(Code)); if not IsSpecialCodeValid(Key, Code) then begin lblCheckResult.Caption := 'Code Invalid'; @@ -78,7 +78,5 @@ begin lblCheckResult.Caption := 'OK'; end; -initialization -{$i exspnamu.lrs} end. diff --git a/components/onguard/examples/exspreg/exspreg.lpi b/components/onguard/examples/exspreg/exspreg.lpi index c85ca8c26..d464301b8 100644 --- a/components/onguard/examples/exspreg/exspreg.lpi +++ b/components/onguard/examples/exspreg/exspreg.lpi @@ -44,7 +44,7 @@ - + @@ -58,14 +58,14 @@ - - + + - + @@ -104,6 +104,22 @@ + + + + + + + + + + + + + + + + diff --git a/components/onguard/examples/exspreg/exspregu.lfm b/components/onguard/examples/exspreg/exspregu.lfm index d4a5d6f09..e3614438c 100644 --- a/components/onguard/examples/exspreg/exspregu.lfm +++ b/components/onguard/examples/exspreg/exspregu.lfm @@ -26,30 +26,32 @@ object Form1: TForm1 ParentColor = False end object Label1: TLabel + AnchorSideLeft.Control = CodeBtn + AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = CodeBtn AnchorSideTop.Side = asrCenter AnchorSideRight.Control = CodeLbl - Left = 266 + Left = 157 Height = 15 Top = 13 Width = 72 - Anchors = [akTop, akRight] + BorderSpacing.Left = 60 BorderSpacing.Right = 8 Caption = 'Current code:' Color = clNone ParentColor = False end object CodeLbl: TLabel + AnchorSideLeft.Control = Label1 + AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = CodeBtn AnchorSideTop.Side = asrCenter - AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 346 + Left = 238 Height = 15 Top = 13 Width = 96 - Anchors = [akTop, akRight] - BorderSpacing.Right = 8 + BorderSpacing.Left = 9 Caption = '0000000000000000' Color = clNone ParentColor = False diff --git a/components/onguard/examples/exspreg/exspregu.lrs b/components/onguard/examples/exspreg/exspregu.lrs deleted file mode 100644 index 3d4042afd..000000000 --- a/components/onguard/examples/exspreg/exspregu.lrs +++ /dev/null @@ -1,56 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#252#0#6'Height'#3'/'#1#3'Top'#3#138#0#5'W' - +'idth'#3#194#1#18'HorzScrollBar.Page'#3#230#1#18'VertScrollBar.Page'#3'.'#1#8 - +'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6'&Special Registratio' - +'n Data Code Example'#12'ClientHeight'#3'/'#1#11'ClientWidth'#3#194#1#20'Con' - +'straints.MinWidth'#3#194#1#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6 - +#7'2.3.0.0'#0#6'TLabel'#9'StatusLbl'#22'AnchorSideLeft.Control'#7#4'Info'#21 - +'AnchorSideTop.Control'#7#8'CloseBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4 - +'Left'#2#8#6'Height'#2#15#3'Top'#3#4#1#5'Width'#2' '#7'Caption'#6#6'Status'#5 - +'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label1'#21'AnchorSideT' - +'op.Control'#7#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSid' - +'eRight.Control'#7#7'CodeLbl'#4'Left'#3#10#1#6'Height'#2#15#3'Top'#2#13#5'Wi' - +'dth'#2'H'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpacing.Right'#2#8#7 - +'Caption'#6#13'Current code:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'T' - +'Label'#7'CodeLbl'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop.S' - +'ide'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRig' - +'ht.Side'#7#9'asrBottom'#4'Left'#3'Z'#1#6'Height'#2#15#3'Top'#2#13#5'Width'#2 - +'`'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpacing.Right'#2#8#7'Captio' - +'n'#6#16'0000000000000000'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#7'TBut' - +'ton'#7'CodeBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Cont' - +'rol'#7#5'Owner'#4'Left'#2#8#6'Height'#2#25#3'Top'#2#8#5'Width'#2'Y'#20'Bord' - +'erSpacing.Around'#2#8#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#10'Ent' - +'er Code'#7'OnClick'#7#12'CodeBtnClick'#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'Clo' - +'seBtn'#21'AnchorSideTop.Control'#7#6'Bevel1'#18'AnchorSideTop.Side'#7#9'asr' - +'Bottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9 - +'asrBottom'#4'Left'#3'o'#1#6'Height'#2#25#3'Top'#3#255#0#5'Width'#2'K'#7'Anc' - +'hors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#8#4'Kind'#7#7'bkC' - +'lose'#8'TabOrder'#2#1#0#0#7'TButton'#9'RemoveBtn'#21'AnchorSideTop.Control' - +#7#8'CloseBtn'#23'AnchorSideRight.Control'#7#8'CloseBtn'#4'Left'#3#6#1#6'Hei' - +'ght'#2#25#3'Top'#3#255#0#5'Width'#2'a'#7'Anchors'#11#5'akTop'#7'akRight'#0 - +#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#11'Remove Code'#7'OnClick'#7 - +#14'RemoveBtnClick'#8'TabOrder'#2#2#0#0#6'TLabel'#4'Info'#22'AnchorSideLeft.' - +'Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop' - +'.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideR' - +'ight.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#3#195#0#3'Top'#2')'#5'Width' - +#3#178#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'BorderSpacing.Arou' - +'nd'#2#8#7'Caption'#12'N'#2#0#0'The label at the bottom of this form indicat' - +'es the status of the code. An invalid code indicates that the code is eithe' - +'r the incorrect type or that none has been entered. '#13#10#13#10'If the pr' - +'oper code has not been entered or the ONGUARD.INI file was deleted, the mes' - +'sage will say that the code is invalid.'#13#10#13#10'Use the "Enter Code" b' - +'utton to enter a code (the CODEGEN program can be used to generate the prop' - +'er "Special" code). '#13#10#13#10'The "Remove Code" button can be used to r' - +'emove the entered code from the INI file. Doing so will cause the TOgSpecia' - +'lCode component to report that the code is invalid.'#5'Color'#7#9'clBtnFace' - +#11'ParentColor'#8#8'WordWrap'#9#0#0#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.C' - +'ontrol'#7#4'Info'#21'AnchorSideTop.Control'#7#4'Info'#18'AnchorSideTop.Side' - +#7#9'asrBottom'#23'AnchorSideRight.Control'#7#4'Info'#20'AnchorSideRight.Sid' - +'e'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#3#3'Top'#3#244#0#5'Width'#3#178#1 - +#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#5'Shape'#7#9'bsTopLine'#0#0#14 - +'TOgSpecialCode'#14'OgSpecialCode1'#9'OnChecked'#7#11'CodeChecked'#8'OnGetKe' - +'y'#7#6'GetKey'#9'OnGetCode'#7#7'GetCode'#4'Left'#3#168#0#3'Top'#3#136#0#0#0 - +#0 -]); diff --git a/components/onguard/examples/exspreg/exspregu.pas b/components/onguard/examples/exspreg/exspregu.pas index c9c5eaf11..d11b9a2d3 100644 --- a/components/onguard/examples/exspreg/exspregu.pas +++ b/components/onguard/examples/exspreg/exspregu.pas @@ -5,8 +5,8 @@ unit Exspregu; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Buttons,LResources, ExtCtrls, OnGuard, IniFiles, OgUtil; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil; type @@ -39,7 +39,10 @@ var implementation +{$R *.lfm} +uses + IniFiles; procedure TForm1.CodeChecked(Sender: TObject; Status: TCodeStatus); var @@ -97,6 +100,7 @@ begin Ini := TIniFile.Create('ONGUARD.INI'); try {store the code in the ini file if it looks OK} + Work := Default(TCode); if HexToBuffer(S, Work, SizeOf(Work)) then begin {save the value} Ini.WriteString('Codes', 'SpecialCode', S); @@ -146,7 +150,4 @@ begin end; -initialization -{$i exspregu.lrs} - end. diff --git a/components/onguard/examples/exsrnm1/exsrnm1.lpi b/components/onguard/examples/exsrnm1/exsrnm1.lpi index 0924c35a2..a8a345694 100644 --- a/components/onguard/examples/exsrnm1/exsrnm1.lpi +++ b/components/onguard/examples/exsrnm1/exsrnm1.lpi @@ -57,9 +57,10 @@ + - - + + @@ -71,9 +72,9 @@ - - + + @@ -82,123 +83,123 @@ - + - + - + - + - + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - - + + diff --git a/components/onguard/examples/exsrnm1/exsrnmu1.lrs b/components/onguard/examples/exsrnm1/exsrnmu1.lrs deleted file mode 100644 index f9f086e3f..000000000 --- a/components/onguard/examples/exsrnm1/exsrnmu1.lrs +++ /dev/null @@ -1,25 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#157#1#6'Height'#3#186#0#3'Top'#3#202#1#5 - +'Width'#3#240#0#18'HorzScrollBar.Page'#3#239#0#18'VertScrollBar.Page'#3#185#0 - +#13'ActiveControl'#7#5'Memo1'#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7 - +'Caption'#6#21'Serial Number Example'#12'ClientHeight'#3#186#0#11'ClientWidt' - +'h'#3#240#0#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6 - +'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Co' - +'ntrol'#7#5'Memo1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Heigh' - +'t'#2#15#3'Top'#2'['#5'Width'#2','#9'Alignment'#7#8'taCenter'#18'BorderSpaci' - +'ng.Left'#2#6#7'Caption'#6#10'Serial #: '#5'Color'#7#6'clNone'#11'ParentColo' - +'r'#8#0#0#5'TMemo'#5'Memo1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorS' - +'ideTop.Control'#7#5'Owner'#4'Left'#2#6#6'Height'#2'O'#3'Top'#2#6#5'Width'#3 - +#223#0#20'BorderSpacing.Around'#2#6#13'Lines.Strings'#1#6':If you can edit t' - +'his, then your program was allowed to run'#0#10'ScrollBars'#7#10'ssVertical' - +#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'CloseBtn'#22'AnchorSideLeft.Control'#7#5'O' - +'wner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#6 - +'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'a'#6'Height'#2#26#3 - +'Top'#2'p'#5'Width'#2'.'#8'AutoSize'#9#17'BorderSpacing.Top'#2#6#20'BorderSp' - +'acing.Bottom'#2#8#4'Kind'#7#7'bkClose'#8'TabOrder'#2#1#0#0#19'TOgSerialNumb' - +'erCode'#19'OgSerialNumberCode1'#9'OnChecked'#7#26'OgSerialNumberCode1Checke' - +'d'#8'OnGetKey'#7#25'OgSerialNumberCode1GetKey'#9'OnGetCode'#7#26'OgSerialNu' - +'mberCode1GetCode'#4'Left'#3#128#0#3'Top'#2#16#0#0#0 -]); diff --git a/components/onguard/examples/exsrnm1/exsrnmu1.pas b/components/onguard/examples/exsrnm1/exsrnmu1.pas index 4f3731398..61224bdbe 100644 --- a/components/onguard/examples/exsrnm1/exsrnmu1.pas +++ b/components/onguard/examples/exsrnm1/exsrnmu1.pas @@ -22,11 +22,8 @@ unit Exsrnmu1; interface uses - SysUtils,Classes,Controls, - Forms, Dialogs, OnGuard, StdCtrls, Buttons,LResources, - - OgUtil, - IniFiles; + SysUtils, Classes, Controls, Forms, Dialogs, OnGuard, StdCtrls, Buttons, IniFiles, + OgUtil; const CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8, @@ -62,7 +59,7 @@ var implementation - +{$R *.lfm} uses Exsrnmu2; @@ -76,11 +73,9 @@ end; {=======================================================================} - procedure TForm1.OgSerialNumberCode1GetCode(Sender: TObject; var Code: TCode); var S1 : string; - L : integer; begin {force the INI file to be in the same directory as the application} TheDir := ExtractFilePath(ParamStr(0)); @@ -134,6 +129,7 @@ begin end; {Check that Release Code was entered correctly} + TC := Default(TCode); HexToBuffer(SNEntryDlg.CodeText.Text, TC, SizeOf(TCode)); if not (IsSerialNumberCodeValid(CKey, TC)) then begin S := 'Release code not entered correctly'; @@ -167,11 +163,8 @@ end; procedure TForm1.OgSerialNumberCode1Checked(Sender: TObject; Status: TCodeStatus); var - S, - C1, - C2 : string; - TC : TCode; - LI : longint; + S: String; + LI: longint; begin case Status of ogValidCode : begin @@ -207,8 +200,5 @@ begin Application.Terminate; end; -initialization -{$i exsrnmu1.lrs} - end. diff --git a/components/onguard/examples/exsrnm1/exsrnmu2.lrs b/components/onguard/examples/exsrnm1/exsrnmu2.lrs deleted file mode 100644 index a447790a2..000000000 --- a/components/onguard/examples/exsrnm1/exsrnmu2.lrs +++ /dev/null @@ -1,46 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TSNEntryDlg','FORMDATA',[ - 'TPF0'#11'TSNEntryDlg'#10'SNEntryDlg'#4'Left'#3#147#1#6'Height'#3#166#0#3'Top' - +#3#26#1#5'Width'#3#247#0#18'HorzScrollBar.Page'#3#246#0#18'VertScrollBar.Pag' - +'e'#3#165#0#13'ActiveControl'#7#6'SNText'#8'AutoSize'#9#7'Caption'#6#13'Seri' - +'al Number'#12'ClientHeight'#3#166#0#11'ClientWidth'#3#247#0#10'LCLVersion'#6 - +#7'2.3.0.0'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'A' - +'nchorSideTop.Control'#7#6'SNText'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'L' - +'eft'#2#8#6'Height'#2#15#3'Top'#2'#'#5'Width'#2#15#18'BorderSpacing.Left'#2#8 - +#7'Caption'#6#2'SN'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'L' - +'abel2'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#8 - +'CodeText'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#15#3 - +'Top'#2'B'#5'Width'#2#28#18'BorderSpacing.Left'#2#8#7'Caption'#6#4'Code'#5'C' - +'olor'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#22'AnchorSideLe' - +'ft.Control'#7#5'Owner'#19'AnchorSideLeft.Side'#7#9'asrCenter'#21'AnchorSide' - +'Top.Control'#7#5'Owner'#4'Left'#2'"'#6'Height'#2#15#3'Top'#2#8#5'Width'#3 - +#178#0#20'BorderSpacing.Around'#2#8#7'Caption'#6'!Call your Vendor NOW to re' - +'gister!'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEdit'#6'SNText'#22'A' - +'nchorSideLeft.Control'#7#8'CodeText'#21'AnchorSideTop.Control'#7#6'Label3' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#8'CodeT' - +'ext'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2','#6'Height'#2#23#3 - +'Top'#2#31#5'Width'#3#185#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8 - +'TabOrder'#2#0#0#0#5'TEdit'#8'CodeText'#22'AnchorSideLeft.Control'#7#6'Label' - +'2'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#6'SNT' - +'ext'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2','#6'Height'#2#23#3'To' - +'p'#2'>'#5'Width'#3#185#0#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2 - +#8#8'TabOrder'#2#1#0#0#7'TBitBtn'#5'OKBtn'#21'AnchorSideTop.Control'#7#6'Bev' - +'el2'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#6 - +'Bevel1'#4'Left'#2'G'#6'Height'#2#26#3'Top'#2'h'#5'Width'#2'.'#7'Anchors'#11 - +#5'akTop'#7'akRight'#0#8'AutoSize'#9#17'BorderSpacing.Top'#2#8#4'Kind'#7#4'b' - +'kOK'#11'ModalResult'#2#1#8'TabOrder'#2#2#0#0#7'TBitBtn'#9'CancelBtn'#22'Anc' - +'horSideLeft.Control'#7#6'Bevel1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21 - +'AnchorSideTop.Control'#7#6'Bevel2'#18'AnchorSideTop.Side'#7#9'asrBottom'#4 - +'Left'#3#129#0#6'Height'#2#26#3'Top'#2'h'#5'Width'#2'.'#8'AutoSize'#9#17'Bor' - +'derSpacing.Top'#2#8#19'BorderSpacing.Right'#2#8#20'BorderSpacing.Bottom'#2#8 - +#4'Kind'#7#8'bkCancel'#7'OnClick'#7#14'CancelBtnClick'#8'TabOrder'#2#3#0#0#6 - +'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.S' - +'ide'#7#9'asrCenter'#4'Left'#2'u'#6'Height'#2#24#3'Top'#2'h'#5'Width'#2#12#5 - +'Shape'#7#8'bsSpacer'#0#0#6'TBevel'#6'Bevel2'#22'AnchorSideLeft.Control'#7#5 - +'Owner'#21'AnchorSideTop.Control'#7#8'CodeText'#18'AnchorSideTop.Side'#7#9'a' - +'srBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7 - +#9'asrBottom'#4'Left'#2#8#6'Height'#2#3#3'Top'#2']'#5'Width'#3#231#0#7'Ancho' - +'rs'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#8#17'Border' - +'Spacing.Top'#2#8#19'BorderSpacing.Right'#2#8#5'Shape'#7#9'bsTopLine'#0#0#0 -]); diff --git a/components/onguard/examples/exsrnm1/exsrnmu2.pas b/components/onguard/examples/exsrnm1/exsrnmu2.pas index 23d42a945..7a837874e 100644 --- a/components/onguard/examples/exsrnm1/exsrnmu2.pas +++ b/components/onguard/examples/exsrnm1/exsrnmu2.pas @@ -4,8 +4,7 @@ unit Exsrnmu2; interface uses - SysUtils,Classes,Controls, - Forms, Dialogs, StdCtrls, Buttons,LResources, ExtCtrls; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls; type @@ -33,12 +32,11 @@ var implementation +{$R *.lfm} + procedure TSNEntryDlg.CancelBtnClick(Sender: TObject); begin Close; end; -initialization -{$i exsrnmu2.lrs} - end. diff --git a/components/onguard/examples/exusg1/exusg1.lpi b/components/onguard/examples/exusg1/exusg1.lpi index ba73a3a4b..c0f65882a 100644 --- a/components/onguard/examples/exusg1/exusg1.lpi +++ b/components/onguard/examples/exusg1/exusg1.lpi @@ -56,14 +56,14 @@ - - + + - + @@ -76,6 +76,22 @@ + + + + + + + + + + + + + + + + diff --git a/components/onguard/examples/exusg1/exusg1u.lrs b/components/onguard/examples/exusg1/exusg1u.lrs deleted file mode 100644 index e8da537c7..000000000 --- a/components/onguard/examples/exusg1/exusg1u.lrs +++ /dev/null @@ -1,24 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'o'#1#6'Height'#3#155#0#3'Top'#3'!'#1#5'Wi' - +'dth'#3#218#0#13'ActiveControl'#7#5'Memo1'#8'AutoSize'#9#11'BorderStyle'#7#8 - +'bsDialog'#7'Caption'#6#18'Usage Code Example'#12'ClientHeight'#3#155#0#11'C' - +'lientWidth'#3#218#0#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3' - +'.0.0'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#19'Anchor' - +'SideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#5'Memo1'#18'Ancho' - +'rSideTop.Side'#7#9'asrBottom'#4'Left'#2'A'#6'Height'#2#15#3'Top'#2'G'#5'Wid' - +'th'#2'Y'#7'Caption'#6#17'Available Runs: 0'#11'ParentColor'#8#0#0#5'TMemo'#5 - +'Memo1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5 - +'Owner'#4'Left'#2#6#6'Height'#2';'#3'Top'#2#6#5'Width'#3#197#0#20'BorderSpac' - +'ing.Around'#2#6#13'Lines.Strings'#1#6'5If you can edit this, your program w' - +'as allowed to run'#0#10'ScrollBars'#7#10'ssVertical'#8'TabOrder'#2#0#0#0#7 - +'TBitBtn'#8'CloseBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLef' - +'t.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#6'Label1'#18'AnchorSideT' - +'op.Side'#7#9'asrBottom'#4'Left'#2'V'#6'Height'#2#26#3'Top'#2'\'#5'Width'#2 - +'.'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#4'Kind'#7#7'bkClose'#8'TabOrd' - +'er'#2#1#0#0#12'TOgUsageCode'#12'OgUsageCode1'#9'OnChecked'#7#19'OgUsageCode' - +'1Checked'#8'OnGetKey'#7#18'OgUsageCode1GetKey'#9'OnGetCode'#7#19'OgUsageCod' - +'e1GetCode'#12'OnChangeCode'#7#22'OgUsageCode1ChangeCode'#4'Left'#2'X'#3'Top' - +#3#160#0#0#0#0 -]); diff --git a/components/onguard/examples/exusg1/exusg1u.pas b/components/onguard/examples/exusg1/exusg1u.pas index 7d214bbe4..2df32cc69 100644 --- a/components/onguard/examples/exusg1/exusg1u.pas +++ b/components/onguard/examples/exusg1/exusg1u.pas @@ -10,11 +10,8 @@ unit Exusg1u; interface uses - SysUtils,Classes,Controls, - Forms, Dialogs, StdCtrls, Buttons, OnGuard, - LResources, - OgUtil, - IniFiles; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, IniFiles, + OnGuard, OgUtil; const CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8, @@ -38,7 +35,7 @@ type public { Public declarations } TheDir : string; - IniFile : TIniFile; + IniFile : TIniFile; end; var @@ -46,7 +43,7 @@ var implementation - +{$R *.lfm} {==========================================================================} @@ -96,8 +93,7 @@ begin Exit; end; - ogRunCountUsed : S := 'No more runs allowed' + #13 - + ' Register NOW '; + ogRunCountUsed : S := 'No more runs allowed.' + LineEnding + 'Register NOW'; ogInvalidCode : begin if not (FileExists(TheDir + 'Usage1.ini')) then begin @@ -106,6 +102,7 @@ begin {hard coded release code for 5 users} {and drop dead date of 2009 Dec. 31} S := 'AECCA5B793AD56155D13'; + Code := Default(TCode); HexToBuffer(S, Code, SizeOf(Code)); IniFile.WriteString('Codes', 'Uses', S); finally @@ -117,8 +114,7 @@ begin S := 'Invalid Code'; end; - ogCodeExpired : S := 'Trial Run period expired' + #13 - + ' Register NOW '; + ogCodeExpired : S := 'Trial Run period expired.' + LineEnding + 'Register NOW'; end; ShowMessage(S); Application.Terminate; @@ -141,9 +137,5 @@ begin end; end; - -initialization -{$i exusg1u.lrs} - end. diff --git a/components/onguard/examples/exusg2/exusg2.lpi b/components/onguard/examples/exusg2/exusg2.lpi index cf9e94e38..96c7bb743 100644 --- a/components/onguard/examples/exusg2/exusg2.lpi +++ b/components/onguard/examples/exusg2/exusg2.lpi @@ -56,13 +56,14 @@ - - + + + - + @@ -75,6 +76,14 @@ + + + + + + + + diff --git a/components/onguard/examples/exusg2/exusg2u.lrs b/components/onguard/examples/exusg2/exusg2u.lrs deleted file mode 100644 index 209f88d93..000000000 --- a/components/onguard/examples/exusg2/exusg2u.lrs +++ /dev/null @@ -1,25 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'K'#1#6'Height'#3#155#0#3'Top'#3#225#0#5'W' - +'idth'#3#218#0#18'HorzScrollBar.Page'#3#217#0#18'VertScrollBar.Page'#3#154#0 - +#13'ActiveControl'#7#5'Memo1'#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7 - +'Caption'#6#18'Usage Code Example'#12'ClientHeight'#3#155#0#11'ClientWidth'#3 - +#218#0#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLab' - +'el'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideLeft.Side' - +#7#9'asrCenter'#21'AnchorSideTop.Control'#7#5'Memo1'#18'AnchorSideTop.Side'#7 - +#9'asrBottom'#4'Left'#2'A'#6'Height'#2#15#3'Top'#2'G'#5'Width'#2'Y'#7'Captio' - +'n'#6#17'Available Runs: 0'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TMe' - +'mo'#5'Memo1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control' - +#7#5'Owner'#4'Left'#2#6#6'Height'#2';'#3'Top'#2#6#5'Width'#3#197#0#20'Border' - +'Spacing.Around'#2#6#13'Lines.Strings'#1#6'5If you can edit this, your progr' - +'am was allowed to run'#0#10'ScrollBars'#7#10'ssVertical'#8'TabOrder'#2#0#0#0 - +#7'TBitBtn'#8'CloseBtn'#22'AnchorSideLeft.Control'#7#5'Owner'#19'AnchorSideL' - +'eft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#6'Label1'#18'AnchorSid' - +'eTop.Side'#7#9'asrBottom'#4'Left'#2'V'#6'Height'#2#26#3'Top'#2'\'#5'Width'#2 - +'.'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#4'Kind'#7#7'bkClose'#8'TabOrd' - +'er'#2#1#0#0#12'TOgUsageCode'#12'OgUsageCode2'#9'OnChecked'#7#19'OgUsageCode' - +'2Checked'#8'OnGetKey'#7#18'OgUsageCode2GetKey'#9'OnGetCode'#7#19'OgUsageCod' - +'e2GetCode'#12'OnChangeCode'#7#22'OgUsageCode2ChangeCode'#4'Left'#2'X'#3'Top' - +#3#160#0#0#0#0 -]); diff --git a/components/onguard/examples/exusg2/exusg2u.pas b/components/onguard/examples/exusg2/exusg2u.pas index 9bd9cce82..439d0dfca 100644 --- a/components/onguard/examples/exusg2/exusg2u.pas +++ b/components/onguard/examples/exusg2/exusg2u.pas @@ -14,12 +14,8 @@ unit Exusg2u; interface uses - SysUtils,Classes,Controls, - Forms, Dialogs, StdCtrls, Buttons, OnGuard, - LResources, - - OgUtil, - IniFiles; + SysUtils,Classes,Controls, Forms, Dialogs, StdCtrls, Buttons, IniFiles, + OnGuard, OgUtil; const CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8, @@ -51,7 +47,7 @@ var implementation - +{$R *.lfm} {==========================================================================} @@ -100,8 +96,7 @@ begin Exit; end; - ogRunCountUsed : S := 'No more runs allowed' + #13 - + ' Register NOW '; + ogRunCountUsed : S := 'No more runs allowed.' + LineEnding + 'Register NOW'; ogInvalidCode : begin if not (FileExists(TheDir + 'Usage2.ini')) then begin @@ -124,8 +119,7 @@ begin S := 'Invalid Code'; end; - ogCodeExpired : S := 'Trial Run period expired' + #13 - + ' Register NOW '; + ogCodeExpired : S := 'Trial Run period expired.' + LineEnding + 'Register NOW'; end; ShowMessage(S); @@ -153,9 +147,5 @@ begin end; -initialization -{$i exusg2u.lrs} - - end. diff --git a/components/onguard/examples/exusreg/ONGUARD.INI b/components/onguard/examples/exusreg/ONGUARD.INI index c01ebd474..5f86192c5 100644 --- a/components/onguard/examples/exusreg/ONGUARD.INI +++ b/components/onguard/examples/exusreg/ONGUARD.INI @@ -1,2 +1,2 @@ [Codes] -UsageCode=443FD9A805DFF808B826 +UsageCode=B9CB4BEA70AE289AB826 diff --git a/components/onguard/examples/exusreg/exusreg.lpi b/components/onguard/examples/exusreg/exusreg.lpi index 4ad20cabb..feca955bc 100644 --- a/components/onguard/examples/exusreg/exusreg.lpi +++ b/components/onguard/examples/exusreg/exusreg.lpi @@ -56,13 +56,14 @@ - + + - + @@ -71,6 +72,14 @@ + + + + + + + + diff --git a/components/onguard/examples/exusreg/exusregu.lfm b/components/onguard/examples/exusreg/exusregu.lfm index 160b5381d..f20645308 100644 --- a/components/onguard/examples/exusreg/exusregu.lfm +++ b/components/onguard/examples/exusreg/exusregu.lfm @@ -18,37 +18,39 @@ object Form1: TForm1 AnchorSideTop.Side = asrCenter Left = 8 Height = 15 - Top = 238 + Top = 234 Width = 32 Caption = 'Status' Color = clNone ParentColor = False end object Label1: TLabel + AnchorSideLeft.Control = CodeBtn + AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = CodeBtn AnchorSideTop.Side = asrCenter AnchorSideRight.Control = CodeLbl - Left = 304 + Left = 157 Height = 15 Top = 13 Width = 72 - Anchors = [akTop, akRight] + BorderSpacing.Left = 60 BorderSpacing.Right = 12 Caption = 'Current code:' Color = clNone ParentColor = False end object CodeLbl: TLabel + AnchorSideLeft.Control = Label1 + AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = CodeBtn AnchorSideTop.Side = asrCenter - AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 388 + Left = 241 Height = 15 Top = 13 Width = 96 - Anchors = [akTop, akRight] - BorderSpacing.Right = 8 + BorderSpacing.Left = 8 Caption = '0000000000000000' Color = clNone ParentColor = False @@ -73,10 +75,10 @@ object Form1: TForm1 AnchorSideRight.Side = asrBottom Left = 409 Height = 25 - Top = 233 + Top = 229 Width = 75 Anchors = [akTop, akRight] - BorderSpacing.Top = 12 + BorderSpacing.Top = 8 BorderSpacing.Right = 8 BorderSpacing.Bottom = 8 Kind = bkClose @@ -87,7 +89,7 @@ object Form1: TForm1 AnchorSideRight.Control = CloseBtn Left = 304 Height = 25 - Top = 233 + Top = 229 Width = 97 Anchors = [akTop, akRight] BorderSpacing.Right = 8 @@ -132,7 +134,7 @@ object Form1: TForm1 OnGetKey = GetKey OnGetCode = GetCode OnChangeCode = ChangeCode - Left = 184 - Top = 184 + Left = 176 + Top = 208 end end diff --git a/components/onguard/examples/exusreg/exusregu.lrs b/components/onguard/examples/exusreg/exusregu.lrs deleted file mode 100644 index 6aaf1960c..000000000 --- a/components/onguard/examples/exusreg/exusregu.lrs +++ /dev/null @@ -1,57 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TForm1','FORMDATA',[ - 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#252#0#6'Height'#3':'#1#3'Top'#3#138#0#5'W' - +'idth'#3#236#1#18'HorzScrollBar.Page'#3#235#1#18'VertScrollBar.Page'#3'+'#1#8 - +'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#18'Usage Code Exampl' - +'e'#12'ClientHeight'#3':'#1#11'ClientWidth'#3#236#1#8'Position'#7#14'poScree' - +'nCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#9'StatusLbl'#22'AnchorSide' - +'Left.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#8'CloseBtn'#18'AnchorSi' - +'deTop.Side'#7#9'asrCenter'#4'Left'#2#8#6'Height'#2#15#3'Top'#3#238#0#5'Widt' - +'h'#2' '#7'Caption'#6#6'Status'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6 - +'TLabel'#6'Label1'#21'AnchorSideTop.Control'#7#7'CodeBtn'#18'AnchorSideTop.S' - +'ide'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#7'CodeLbl'#4'Left'#3'0'#1 - +#6'Height'#2#15#3'Top'#2#13#5'Width'#2'H'#7'Anchors'#11#5'akTop'#7'akRight'#0 - +#19'BorderSpacing.Right'#2#12#7'Caption'#6#13'Current code:'#5'Color'#7#6'cl' - +'None'#11'ParentColor'#8#0#0#6'TLabel'#7'CodeLbl'#21'AnchorSideTop.Control'#7 - +#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control' - +#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#132#1#6'Height' - +#2#15#3'Top'#2#13#5'Width'#2'`'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'Borde' - +'rSpacing.Right'#2#8#7'Caption'#6#16'0000000000000000'#5'Color'#7#6'clNone' - +#11'ParentColor'#8#0#0#7'TButton'#7'CodeBtn'#22'AnchorSideLeft.Control'#7#5 - +'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#8#6'Height'#2#25#3'To' - +'p'#2#8#5'Width'#2'Y'#20'BorderSpacing.Around'#2#8#25'BorderSpacing.InnerBor' - +'der'#2#4#7'Caption'#6#10'Enter Code'#7'OnClick'#7#12'CodeBtnClick'#8'TabOrd' - +'er'#2#0#0#0#7'TBitBtn'#8'CloseBtn'#21'AnchorSideTop.Control'#7#6'Bevel1'#18 - +'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20 - +'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#153#1#6'Height'#2#25#3'Top'#3 - +#233#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.To' - +'p'#2#12#19'BorderSpacing.Right'#2#8#20'BorderSpacing.Bottom'#2#8#4'Kind'#7#7 - +'bkClose'#8'TabOrder'#2#1#0#0#7'TButton'#9'RemoveBtn'#21'AnchorSideTop.Contr' - +'ol'#7#8'CloseBtn'#23'AnchorSideRight.Control'#7#8'CloseBtn'#4'Left'#3'0'#1#6 - +'Height'#2#25#3'Top'#3#233#0#5'Width'#2'a'#7'Anchors'#11#5'akTop'#7'akRight' - +#0#19'BorderSpacing.Right'#2#8#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6 - +#11'Remove Code'#7'OnClick'#7#14'RemoveBtnClick'#8'TabOrder'#2#2#0#0#6'TLabe' - +'l'#4'Info'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7 - +#7'CodeBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control' - +#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#3 - +#165#0#3'Top'#2')'#5'Width'#3#220#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRig' - +'ht'#0#20'BorderSpacing.Around'#2#8#7'Caption'#12'J'#2#0#0'The label at the ' - +'bottom of this form indicates the status of the code. An invalid code indic' - +'ates that the code is either the incorrect type or that none has been enter' - +'ed. '#13#10#13#10'If the proper code has not been entered or the ONGUARD.IN' - +'I file was deleted, the message will say that the code is invalid.'#13#10#13 - +#10'Use the "Enter Code" button to enter a code (the CODEGEN program can be ' - +'used to generate the proper "Usage" code). '#13#10#13#10'The "Remove Code" ' - +'button can be used to remove the entered code from the INI file. Doing so w' - +'ill cause the TOgUsageCode component to report that the code is invalid.'#5 - +'Color'#7#9'clBtnFace'#11'ParentColor'#8#8'WordWrap'#9#0#0#6'TBevel'#6'Bevel' - +'1'#22'AnchorSideLeft.Control'#7#4'Info'#21'AnchorSideTop.Control'#7#4'Info' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#4'Info' - +#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#3#3'Top'#3 - +#218#0#5'Width'#3#220#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'Bor' - +'derSpacing.Top'#2#12#5'Shape'#7#9'bsTopLine'#0#0#12'TOgUsageCode'#12'OgUsag' - +'eCode1'#9'OnChecked'#7#11'CodeChecked'#8'OnGetKey'#7#6'GetKey'#9'OnGetCode' - +#7#7'GetCode'#12'OnChangeCode'#7#10'ChangeCode'#4'Left'#3#184#0#3'Top'#3#184 - +#0#0#0#0 -]); diff --git a/components/onguard/examples/exusreg/exusregu.pas b/components/onguard/examples/exusreg/exusregu.pas index 0de2a0d8f..3b0794bf0 100644 --- a/components/onguard/examples/exusreg/exusregu.pas +++ b/components/onguard/examples/exusreg/exusregu.pas @@ -5,8 +5,8 @@ unit ExUSRegU; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - StdCtrls, Buttons,LResources, ExtCtrls, OnGuard, IniFiles, OgUtil; + SysUtils, Classes,Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, + OnGuard, OgUtil; type @@ -39,7 +39,10 @@ var implementation +{$R *.lfm} +uses + IniFiles; procedure TForm1.CodeChecked(Sender: TObject; Status: TCodeStatus); var @@ -146,7 +149,5 @@ begin end; end; -initialization -{$i exusregu.lrs} end. diff --git a/components/onguard/examples/fixnaf/fixnaf.lpi b/components/onguard/examples/fixnaf/fixnaf.lpi index dead7fe0f..c505f0788 100644 --- a/components/onguard/examples/fixnaf/fixnaf.lpi +++ b/components/onguard/examples/fixnaf/fixnaf.lpi @@ -37,12 +37,11 @@ - + - @@ -56,7 +55,8 @@ - + + @@ -109,8 +109,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -127,6 +154,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/onguard/examples/fixnaf/fixnaf.lpr b/components/onguard/examples/fixnaf/fixnaf.lpr index 385a6bd70..636a96145 100644 --- a/components/onguard/examples/fixnaf/fixnaf.lpr +++ b/components/onguard/examples/fixnaf/fixnaf.lpr @@ -7,18 +7,15 @@ uses ogfirst, FIXNAF1 in 'FIXNAF1.pas' {MainFrm}; - - - {$R *.res} begin Application.Initialize; Application.Title:=''; Application.CreateForm(TMainFrm, MainFrm); - - if IsFirstInstance then Application.Run + + if IsFirstInstance then + Application.Run else - ActivateFirstInstance; - + ActivateFirstInstance; end. diff --git a/components/onguard/examples/fixnaf/fixnaf1.lrs b/components/onguard/examples/fixnaf/fixnaf1.lrs deleted file mode 100644 index 34aca6373..000000000 --- a/components/onguard/examples/fixnaf/fixnaf1.lrs +++ /dev/null @@ -1,95 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TMainFrm','FORMDATA',[ - 'TPF0'#8'TMainFrm'#7'MainFrm'#4'Left'#3'u'#1#6'Height'#3#228#0#3'Top'#3#235#0 - +#5'Width'#3'|'#1#18'HorzScrollBar.Page'#3'U'#1#19'HorzScrollBar.Range'#3'E'#1 - +#18'VertScrollBar.Page'#3#215#0#19'VertScrollBar.Range'#3#169#0#13'ActiveCon' - +'trol'#7#12'AccessCodeEd'#8'AutoSize'#9#11'BorderIcons'#11#12'biSystemMenu' - +#10'biMinimize'#0#7'Caption'#6#23'Fix Network Access File'#12'ClientHeight'#3 - +#228#0#11'ClientWidth'#3'|'#1#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14 - +'poScreenCenter'#10'LCLVersion'#6#7'2.3.0.0'#0#9'TGroupBox'#9'GroupBox1'#22 - +'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23 - +'AnchorSideRight.Control'#7#8'DeleteBt'#20'AnchorSideRight.Side'#7#9'asrBott' - +'om'#4'Left'#2#12#6'Height'#2'X'#3'Top'#2#12#5'Width'#3'8'#1#7'Anchors'#11#5 - +'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#12#17 - +'BorderSpacing.Top'#2#12#20'BorderSpacing.Bottom'#2#12#7'Caption'#6#13'File ' - +'Settings'#12'ClientHeight'#2'D'#11'ClientWidth'#3'4'#1#8'TabOrder'#2#0#0#6 - +'TLabel'#6'Label4'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTo' - +'p.Control'#7#12'AccessCodeEd'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left' - +#2#12#6'Height'#2#15#3'Top'#2'%'#5'Width'#2#31#18'BorderSpacing.Left'#2#12#7 - +'Caption'#6#6'C&ode:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6 - +'Label5'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control' - +#7#10'FileNamePn'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Heigh' - +'t'#2#15#3'Top'#2#7#5'Width'#2'3'#18'BorderSpacing.Left'#2#12#19'BorderSpaci' - +'ng.Right'#2#8#7'Caption'#6#10'&Filename:'#5'Color'#7#6'clNone'#11'ParentCol' - +'or'#8#0#0#5'TEdit'#12'AccessCodeEd'#22'AnchorSideLeft.Control'#7#10'FileNam' - +'ePn'#21'AnchorSideTop.Control'#7#10'FileNamePn'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#23'AnchorSideRight.Control'#7#10'FileNamePn'#20'AnchorSideRight.' - +'Side'#7#9'asrBottom'#4'Left'#2'G'#6'Height'#2#23#3'Top'#2'!'#5'Width'#3#225 - +#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#8#20 - +'BorderSpacing.Bottom'#2#12#8'OnChange'#7#18'AccessCodeEdChange'#8'TabOrder' - +#2#1#0#0#6'TPanel'#10'FileNamePn'#22'AnchorSideLeft.Control'#7#6'Label5'#19 - +'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'GroupBox1' - +#23'AnchorSideRight.Control'#7#9'GroupBox1'#20'AnchorSideRight.Side'#7#9'asr' - +'Bottom'#4'Left'#2'G'#6'Height'#2#21#3'Top'#2#4#5'Width'#3#225#0#9'Alignment' - +#7#13'taLeftJustify'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'Border' - +'Spacing.Top'#2#4#19'BorderSpacing.Right'#2#12#10'BevelOuter'#7#9'bvLowered' - +#11'BorderWidth'#2#2#8'TabOrder'#2#0#0#0#0#7'TButton'#8'UpdateBt'#22'AnchorS' - +'ideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'GroupBox2'#18'Anc' - +'horSideTop.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2#25#3'Top'#3#175#0#5 - +'Width'#2'K'#18'BorderSpacing.Left'#2#12#17'BorderSpacing.Top'#2#12#20'Borde' - +'rSpacing.Bottom'#2#12#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#7'&Upd' - +'ate'#7'OnClick'#7#13'UpdateBtClick'#8'TabOrder'#2#2#0#0#7'TButton'#8'Create' - +'Bt'#22'AnchorSideLeft.Control'#7#8'UpdateBt'#19'AnchorSideLeft.Side'#7#9'as' - +'rBottom'#21'AnchorSideTop.Control'#7#9'GroupBox2'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#4'Left'#2'['#6'Height'#2#25#3'Top'#3#175#0#5'Width'#2'K'#18'Bord' - +'erSpacing.Left'#2#4#17'BorderSpacing.Top'#2#12#25'BorderSpacing.InnerBorder' - +#2#4#7'Caption'#6#7'&Create'#7'Enabled'#8#7'OnClick'#7#13'CreateBtClick'#8'T' - +'abOrder'#2#3#0#0#7'TButton'#7'ResetBt'#22'AnchorSideLeft.Control'#7#8'Creat' - +'eBt'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'G' - +'roupBox2'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#170#0#6'Height'#2 - +#25#3'Top'#3#175#0#5'Width'#2'K'#18'BorderSpacing.Left'#2#4#17'BorderSpacing' - +'.Top'#2#12#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'&Reset'#7'OnCli' - +'ck'#7#12'ResetBtClick'#8'TabOrder'#2#4#0#0#9'TGroupBox'#9'GroupBox2'#22'Anc' - +'horSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'GroupBox1'#18 - +'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#8'DeleteBt' - +#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2'3'#3'Top'#2 - +'p'#5'Width'#3'8'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize' - +#9#18'BorderSpacing.Left'#2#12#17'BorderSpacing.Top'#2#12#7'Caption'#6#12'Ac' - +'cess Slots'#12'ClientHeight'#2#31#11'ClientWidth'#3'4'#1#8'TabOrder'#2#1#0#6 - +'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#9'GroupBox2'#21'AnchorSideTo' - +'p.Control'#7#9'GroupBox2'#4'Left'#2#24#6'Height'#2#15#3'Top'#2#8#5'Width'#2 - +#28#18'BorderSpacing.Left'#2#24#17'BorderSpacing.Top'#2#8#20'BorderSpacing.B' - +'ottom'#2#8#7'Caption'#6#6'Total:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0 - +#6'TLabel'#6'Label2'#21'AnchorSideTop.Control'#7#9'GroupBox2'#23'AnchorSideR' - +'ight.Control'#7#6'Bevel1'#4'Left'#2'm'#6'Height'#2#15#3'Top'#2#8#5'Width'#2 - +')'#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#8#20'BorderS' - +'pacing.Bottom'#2#8#7'Caption'#6#7'Locked:'#5'Color'#7#6'clNone'#11'ParentCo' - ,'lor'#8#0#0#6'TLabel'#6'Label3'#21'AnchorSideTop.Control'#7#9'GroupBox2'#23 - +'AnchorSideRight.Control'#7#14'InvalidSlotsLb'#4'Left'#3#232#0#6'Height'#2#15 - +#3'Top'#2#8#5'Width'#2'&'#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpaci' - +'ng.Top'#2#8#19'BorderSpacing.Right'#2#8#20'BorderSpacing.Bottom'#2#8#7'Capt' - +'ion'#6#8'Invalid:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#12 - +'TotalSlotsLb'#22'AnchorSideLeft.Control'#7#6'Label1'#19'AnchorSideLeft.Side' - +#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'GroupBox2'#4'Left'#2'<'#6'Heig' - +'ht'#2#15#3'Top'#2#8#5'Width'#2#6#18'BorderSpacing.Left'#2#8#17'BorderSpacin' - +'g.Top'#2#8#20'BorderSpacing.Bottom'#2#8#7'Caption'#6#1'0'#5'Color'#7#6'clNo' - +'ne'#11'ParentColor'#8#0#0#6'TLabel'#13'LockedSlotsLb'#22'AnchorSideLeft.Con' - +'trol'#7#6'Bevel1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.C' - +'ontrol'#7#9'GroupBox2'#4'Left'#3#158#0#6'Height'#2#15#3'Top'#2#8#5'Width'#2 - +#6#17'BorderSpacing.Top'#2#8#20'BorderSpacing.Bottom'#2#8#7'Caption'#6#1'0'#5 - +'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'InvalidSlotsLb'#21'An' - +'chorSideTop.Control'#7#9'GroupBox2'#23'AnchorSideRight.Control'#7#9'GroupBo' - +'x2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#22#1#6'Height'#2#15#3 - +'Top'#2#8#5'Width'#2#6#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.' - +'Top'#2#8#19'BorderSpacing.Right'#2#24#20'BorderSpacing.Bottom'#2#8#7'Captio' - +'n'#6#1'0'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TBevel'#6'Bevel1'#22 - +'AnchorSideLeft.Control'#7#9'GroupBox2'#19'AnchorSideLeft.Side'#7#9'asrCente' - +'r'#4'Left'#3#150#0#6'Height'#2#14#3'Top'#2#9#5'Width'#2#8#5'Shape'#7#8'bsSp' - +'acer'#0#0#0#7'TButton'#8'DeleteBt'#22'AnchorSideLeft.Control'#7#7'ResetBt' - +#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'GroupB' - +'ox2'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#249#0#6'Height'#2#25#3 - +'Top'#3#175#0#5'Width'#2'K'#18'BorderSpacing.Left'#2#4#17'BorderSpacing.Top' - +#2#12#19'BorderSpacing.Right'#2#12#25'BorderSpacing.InnerBorder'#2#4#7'Capti' - +'on'#6#7'&Delete'#7'OnClick'#7#13'DeleteBtClick'#8'TabOrder'#2#5#0#0#0 -]); diff --git a/components/onguard/examples/fixnaf/fixnaf1.pas b/components/onguard/examples/fixnaf/fixnaf1.pas index 2ed6e97aa..84620e30f 100644 --- a/components/onguard/examples/fixnaf/fixnaf1.pas +++ b/components/onguard/examples/fixnaf/fixnaf1.pas @@ -3,8 +3,8 @@ unit FIXNAF1; interface uses - IniFiles, SysUtils, Forms, Classes, Dialogs, - StdCtrls, Controls, ExtCtrls,Buttons,LResources,onguard, ognetwrk, ogutil; + SysUtils, Forms, Classes, Dialogs, StdCtrls, Controls, ExtCtrls, Buttons, + onguard, ognetwrk, ogutil; type @@ -49,8 +49,7 @@ var implementation - - +{$R *.lfm} procedure TMainFrm.FormCreate(Sender: TObject); const @@ -126,6 +125,7 @@ function TMainFrm.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); @@ -140,6 +140,7 @@ var Code : TCode; begin Result := -1; + Code := Default(TCode); if (Length(Str) = SizeOf(Code) * 2) then begin HexToBuffer(Str, Code, SizeOf(Code)); Result := DecodeNAFCountCode(Key, Code); @@ -147,8 +148,5 @@ begin end; -initialization -{$i fixnaf1.lrs} - end. diff --git a/components/onguard/examples/nafmgr/nafmgr.lpi b/components/onguard/examples/nafmgr/nafmgr.lpi index 3c65bb7a4..8ea63a947 100644 --- a/components/onguard/examples/nafmgr/nafmgr.lpi +++ b/components/onguard/examples/nafmgr/nafmgr.lpi @@ -40,7 +40,7 @@ - + @@ -59,7 +59,8 @@ - + + @@ -70,8 +71,22 @@ + + + + + + + + + + + + + + - + @@ -88,6 +103,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/onguard/examples/nafmgr/nafmgr.lpr b/components/onguard/examples/nafmgr/nafmgr.lpr index f93318751..78c857232 100644 --- a/components/onguard/examples/nafmgr/nafmgr.lpr +++ b/components/onguard/examples/nafmgr/nafmgr.lpr @@ -14,7 +14,7 @@ begin Application.Initialize; Application.Title := 'Network File Access Manager'; Application.CreateForm(TNafFrm, NafFrm); - + if IsFirstInstance then Application.Run else diff --git a/components/onguard/examples/nafmgr/nafmgr1.lfm b/components/onguard/examples/nafmgr/nafmgr1.lfm index 7a3b8a715..7b5eb4e4b 100644 --- a/components/onguard/examples/nafmgr/nafmgr1.lfm +++ b/components/onguard/examples/nafmgr/nafmgr1.lfm @@ -323,7 +323,7 @@ object NafFrm: TNafFrm TabOrder = 5 end object OpenDg: TOpenDialog - Title = 'Otwórz istniej¹cy plik' + Title = 'Otwórz istniej¹cy plik' DefaultExt = '.naf' Filter = 'Network Access Files (*.naf)|*.naf|All Files (*.*)|*.*' FilterIndex = 0 diff --git a/components/onguard/examples/nafmgr/nafmgr1.lrs b/components/onguard/examples/nafmgr/nafmgr1.lrs deleted file mode 100644 index 4c1ed63ff..000000000 --- a/components/onguard/examples/nafmgr/nafmgr1.lrs +++ /dev/null @@ -1,125 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TNafFrm','FORMDATA',[ - 'TPF0'#7'TNafFrm'#6'NafFrm'#4'Left'#3'3'#1#6'Height'#3#223#0#3'Top'#3'#'#1#5 - +'Width'#3'c'#1#18'HorzScrollBar.Page'#3'M'#1#19'HorzScrollBar.Range'#3'E'#1 - +#18'VertScrollBar.Page'#3#231#0#19'VertScrollBar.Range'#3#177#0#13'ActiveCon' - +'trol'#7#12'AccessCodeEd'#8'AutoSize'#9#11'BorderIcons'#11#12'biSystemMenu' - +#10'biMinimize'#0#7'Caption'#6#27'Network Access File Manager'#12'ClientHeig' - +'ht'#3#223#0#11'ClientWidth'#3'c'#1#8'OnCreate'#7#10'FormCreate'#8'Position' - +#7#14'poScreenCenter'#8'ShowHint'#9#10'LCLVersion'#6#7'2.3.0.0'#0#9'TGroupBo' - +'x'#9'GroupBox1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Cont' - +'rol'#7#5'Owner'#23'AnchorSideRight.Control'#7#8'DeleteBt'#20'AnchorSideRigh' - +'t.Side'#7#9'asrBottom'#4'Left'#2#12#6'Height'#2'Z'#3'Top'#2#12#5'Width'#3'D' - +#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#12 - +#17'BorderSpacing.Top'#2#12#20'BorderSpacing.Bottom'#2#12#7'Caption'#6#13'Fi' - +'le Settings'#12'ClientHeight'#2'F'#11'ClientWidth'#3'@'#1#8'TabOrder'#2#0#0 - +#12'TSpeedButton'#14'GenerateCodeSb'#21'AnchorSideTop.Control'#7#12'AccessCo' - +'deEd'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#9 - +'GroupBox1'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#29#1#6'Height' - +#2#23#4'Hint'#6#13'Generate code'#3'Top'#2#4#5'Width'#2#23#7'Anchors'#11#5'a' - +'kTop'#7'akRight'#0#19'BorderSpacing.Right'#2#12#10'Glyph.Data'#10'F'#1#0#0 - +'B'#1#0#0'BMB'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#17#0#0#0#17#0#0#0#1#0#4#0#0#0 - +#0#0#204#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0 - +#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192#0#0#0 - +#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0 - +#136#136#136#136#136#136#136#136#128#0#0#0#136#136#136#136#136#136#136#136 - +#128#0#0#0#136#136#136#0#0#8#136#136#128#0#0#0#136#136#0#136#128#128#8#136 - +#128#0#0#0#136#128#128#136#136#136#0#136#128#0#0#0#136#8#136#128#0#136#136#8 - +#128#0#0#0#136#0#136#0#0#8#136#8#128#0#0#0#128#136#128#9#137#0#128#128#128#0 - +#0#0#128#136#128#8#152#0#136#128#128#0#0#0#128#8#128#8#152#0#136#0#128#0#0#0 - +#128#136#128#9#137#0#136#128#128#0#0#0#136#8#136#0#0#8#136#8#128#0#0#0#136#8 - +#8#128#0#136#8#8#128#0#0#0#136#128#136#8#136#136#128#136#128#0#0#0#136#136#0 - +#136#128#128#8#136#128#0#0#0#136#136#136#0#0#8#136#136#128#0#0#0#136#136#136 - +#136#136#136#136#136#128#0#0#0#7'OnClick'#7#19'GenerateCodeSbClick'#0#0#6'TL' - +'abel'#6'Label4'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.' - +'Control'#7#12'AccessCodeEd'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2 - +#12#6'Height'#2#15#3'Top'#2#8#5'Width'#2#31#18'BorderSpacing.Left'#2#12#7'Ca' - +'ption'#6#6'C&ode:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'L' - +'abel5'#22'AnchorSideLeft.Control'#7#9'GroupBox1'#21'AnchorSideTop.Control'#7 - +#10'FileNameEd'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height' - +#2#15#3'Top'#2')'#5'Width'#2'3'#18'BorderSpacing.Left'#2#12#7'Caption'#6#10 - +'&Filename:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEdit'#10'FileName' - +'Ed'#22'AnchorSideLeft.Control'#7#6'Label5'#19'AnchorSideLeft.Side'#7#9'asrB' - +'ottom'#21'AnchorSideTop.Control'#7#14'GenerateCodeSb'#18'AnchorSideTop.Side' - +#7#9'asrBottom'#23'AnchorSideRight.Control'#7#8'BrowseBt'#4'Left'#2'G'#6'Hei' - +'ght'#2#23#3'Top'#2'%'#5'Width'#3#210#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'a' - +'kRight'#0#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2#10#19'BorderSp' - +'acing.Right'#2#4#20'BorderSpacing.Bottom'#2#10#8'OnChange'#7#16'FileNameEdC' - +'hange'#8'TabOrder'#2#1#0#0#5'TEdit'#12'AccessCodeEd'#22'AnchorSideLeft.Cont' - +'rol'#7#10'FileNameEd'#21'AnchorSideTop.Control'#7#9'GroupBox1'#23'AnchorSid' - +'eRight.Control'#7#14'GenerateCodeSb'#4'Left'#2'G'#6'Height'#2#23#3'Top'#2#4 - +#5'Width'#3#210#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpa' - +'cing.Top'#2#4#19'BorderSpacing.Right'#2#4#8'OnChange'#7#18'AccessCodeEdChan' - +'ge'#8'TabOrder'#2#0#0#0#12'TSpeedButton'#8'BrowseBt'#22'AnchorSideLeft.Cont' - +'rol'#7#10'FileNameEd'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideT' - +'op.Control'#7#10'FileNameEd'#23'AnchorSideRight.Control'#7#9'GroupBox1'#20 - +'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#10'File' - +'NameEd'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#29#1#6'Height'#2 - +#23#4'Hint'#6#30'Browse for network access file'#3'Top'#2'%'#5'Width'#2#23#7 - +'Anchors'#11#5'akTop'#7'akRight'#8'akBottom'#0#19'BorderSpacing.Right'#2#12 - +#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'...'#7'OnClick'#7#13'Brows' - +'eBtClick'#0#0#0#7'TButton'#8'UpdateBt'#22'AnchorSideLeft.Control'#7#5'Owner' - +#21'AnchorSideTop.Control'#7#9'GroupBox2'#18'AnchorSideTop.Side'#7#9'asrBott' - +'om'#4'Left'#2#12#6'Height'#2#25#4'Hint'#6'0Update the selected NAF using th' - +'e specified code'#3'Top'#3#182#0#5'Width'#2'K'#18'BorderSpacing.Left'#2#12 - +#17'BorderSpacing.Top'#2#12#20'BorderSpacing.Bottom'#2#12#25'BorderSpacing.I' - +'nnerBorder'#2#4#7'Caption'#6#7'&Update'#7'Enabled'#8#7'OnClick'#7#13'Update' - ,'BtClick'#8'TabOrder'#2#2#0#0#7'TButton'#8'CreateBt'#22'AnchorSideLeft.Contr' - +'ol'#7#8'UpdateBt'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.C' - +'ontrol'#7#9'GroupBox2'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'_'#6 - +'Height'#2#25#4'Hint'#6'''Create teh NAF using the specified code'#3'Top'#3 - +#182#0#5'Width'#2'K'#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2#12#25 - +'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#7'&Create'#7'Enabled'#8#7'OnCli' - +'ck'#7#13'CreateBtClick'#8'TabOrder'#2#3#0#0#7'TButton'#7'ResetBt'#22'Anchor' - +'SideLeft.Control'#7#8'CreateBt'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'A' - +'nchorSideTop.Control'#7#9'GroupBox2'#18'AnchorSideTop.Side'#7#9'asrBottom'#4 - +'Left'#3#178#0#6'Height'#2#25#4'Hint'#6'/Reset the specified NAF, removing i' - +'nvalid slots'#3'Top'#3#182#0#5'Width'#2'K'#18'BorderSpacing.Left'#2#8#17'Bo' - +'rderSpacing.Top'#2#12#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'&Res' - +'et'#7'Enabled'#8#7'OnClick'#7#12'ResetBtClick'#8'TabOrder'#2#4#0#0#9'TGroup' - +'Box'#9'GroupBox2'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Co' - +'ntrol'#7#9'GroupBox1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRi' - +'ght.Control'#7#8'DeleteBt'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2 - +#12#6'Height'#2'8'#3'Top'#2'r'#5'Width'#3'D'#1#7'Anchors'#11#5'akTop'#6'akLe' - +'ft'#7'akRight'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#12#7'Caption'#6#12 - +'Access Slots'#12'ClientHeight'#2'$'#11'ClientWidth'#3'@'#1#8'TabOrder'#2#1#0 - +#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#9'GroupBox2'#21'AnchorSide' - +'Top.Control'#7#9'GroupBox2'#4'Left'#2#24#6'Height'#2#15#3'Top'#2#8#5'Width' - +#2#28#18'BorderSpacing.Left'#2#24#17'BorderSpacing.Top'#2#8#7'Caption'#6#6'T' - +'otal:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#21'An' - +'chorSideTop.Control'#7#9'GroupBox2'#23'AnchorSideRight.Control'#7#6'Bevel1' - +#4'Left'#2's'#6'Height'#2#15#3'Top'#2#8#5'Width'#2')'#7'Anchors'#11#5'akTop' - +#7'akRight'#0#17'BorderSpacing.Top'#2#8#7'Caption'#6#7'Locked:'#5'Color'#7#6 - +'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#21'AnchorSideTop.Control' - +#7#9'GroupBox2'#23'AnchorSideRight.Control'#7#14'InvalidSlotsLb'#4'Left'#3 - +#244#0#6'Height'#2#15#3'Top'#2#8#5'Width'#2'&'#7'Anchors'#11#5'akTop'#7'akRi' - +'ght'#0#17'BorderSpacing.Top'#2#8#19'BorderSpacing.Right'#2#8#7'Caption'#6#8 - +'Invalid:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#12'TotalSlot' - +'sLb'#22'AnchorSideLeft.Control'#7#6'Label1'#19'AnchorSideLeft.Side'#7#9'asr' - +'Bottom'#21'AnchorSideTop.Control'#7#9'GroupBox2'#4'Left'#2'<'#6'Height'#2#15 - +#3'Top'#2#8#5'Width'#2#6#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2#8 - +#7'Caption'#6#1'0'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#13'L' - +'ockedSlotsLb'#22'AnchorSideLeft.Control'#7#6'Bevel1'#19'AnchorSideLeft.Side' - +#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'GroupBox2'#4'Left'#3#164#0#6'H' - +'eight'#2#15#3'Top'#2#8#5'Width'#2#6#17'BorderSpacing.Top'#2#8#7'Caption'#6#1 - +'0'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#14'InvalidSlotsLb' - +#21'AnchorSideTop.Control'#7#9'GroupBox2'#23'AnchorSideRight.Control'#7#9'Gr' - +'oupBox2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3'"'#1#6'Height'#2 - +#15#3'Top'#2#8#5'Width'#2#6#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpa' - +'cing.Top'#2#8#19'BorderSpacing.Right'#2#24#7'Caption'#6#1'0'#5'Color'#7#6'c' - +'lNone'#11'ParentColor'#8#0#0#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control' - +#7#9'GroupBox2'#19'AnchorSideLeft.Side'#7#9'asrCenter'#4'Left'#3#156#0#6'Hei' - +'ght'#2'$'#3'Top'#2#0#5'Width'#2#8#5'Shape'#7#8'bsSpacer'#0#0#0#7'TButton'#8 - +'DeleteBt'#22'AnchorSideLeft.Control'#7#7'ResetBt'#19'AnchorSideLeft.Side'#7 - +#9'asrBottom'#21'AnchorSideTop.Control'#7#9'GroupBox2'#18'AnchorSideTop.Side' - +#7#9'asrBottom'#4'Left'#3#5#1#6'Height'#2#25#4'Hint'#6#23'Delete teh selecte' - +'d NAF'#3'Top'#3#182#0#5'Width'#2'K'#18'BorderSpacing.Left'#2#8#17'BorderSpa' - +'cing.Top'#2#12#19'BorderSpacing.Right'#2#12#20'BorderSpacing.Bottom'#2#12#25 - +'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#7'&Delete'#7'Enabled'#8#7'OnCli' - +'ck'#7#13'DeleteBtClick'#8'TabOrder'#2#5#0#0#11'TOpenDialog'#6'OpenDg'#5'Tit' - +'le'#6#24'Otw'#195#179'rz istniej'#194#185'cy plik'#10'DefaultExt'#6#4'.naf' - +#6'Filter'#6'6Network Access Files (*.naf)|*.naf|All Files (*.*)|*.*'#11'Fil' - +'terIndex'#2#0#7'Options'#11#0#4'Left'#3#160#0#3'Top'#2'0'#0#0#12'TOgMakeCod' - +'es'#12'OgMakeCodes1'#4'Left'#3#136#0#3'Top'#3' '#1#0#0#0 -]); diff --git a/components/onguard/examples/nafmgr/nafmgr1.pas b/components/onguard/examples/nafmgr/nafmgr1.pas index 135971b0d..e65a4e8f2 100644 --- a/components/onguard/examples/nafmgr/nafmgr1.pas +++ b/components/onguard/examples/nafmgr/nafmgr1.pas @@ -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. diff --git a/components/onguard/examples/regdemo/frm_main.lrs b/components/onguard/examples/regdemo/frm_main.lrs deleted file mode 100644 index d96d2935a..000000000 --- a/components/onguard/examples/regdemo/frm_main.lrs +++ /dev/null @@ -1,15 +0,0 @@ -LazarusResources.Add('TfrmMain','FORMDATA',[ - 'TPF0'#8'TfrmMain'#7'frmMain'#13'ActiveControl'#7#7'Button1'#7'Caption'#6#11 - +'Hello World'#12'ClientHeight'#3#143#0#11'ClientWidth'#3'o'#1#11'Font.Height' - +#2#243#9'Font.Name'#6#5'Arial'#8'OnCreate'#7#10'FormCreate'#13'PixelsPerInch' - +#2'`'#18'HorzScrollBar.Page'#3'n'#1#18'VertScrollBar.Page'#3#142#0#4'Left'#3 - +''#1#6'Height'#3#143#0#3'Top'#3'!'#1#5'Width'#3'o'#1#0#6'TLabel'#6'Label1'#9 - +'Alignment'#7#8'taCenter'#8'AutoSize'#8#7'Caption'#6#12'Hello World!'#5'Colo' - +'r'#7#6'clNone'#11'Font.Height'#2#223#9'Font.Name'#6#5'Arial'#11'ParentColor' - +#8#4'Left'#2#4#6'Height'#2')'#3'Top'#2#16#5'Width'#3'g'#1#0#0#7'TButton'#7'B' - +'utton1'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#5'Close'#7'OnClick'#7 - +#12'Button1Click'#8'TabOrder'#2#0#4'Left'#3#24#1#6'Height'#2#25#3'Top'#2'X'#5 - +'Width'#2'K'#0#0#7'TButton'#9'btnReadme'#25'BorderSpacing.InnerBorder'#2#4#7 - +'Caption'#6#9'Readme...'#7'OnClick'#7#14'btnReadmeClick'#8'TabOrder'#2#1#4'L' - +'eft'#2#16#6'Height'#2#25#3'Top'#2'X'#5'Width'#2'K'#0#0#0 -]); diff --git a/components/onguard/examples/regdemo/frm_main.pas b/components/onguard/examples/regdemo/frm_main.pas index 0cfd493a4..82b30c569 100644 --- a/components/onguard/examples/regdemo/frm_main.pas +++ b/components/onguard/examples/regdemo/frm_main.pas @@ -5,8 +5,7 @@ unit frm_Main; interface uses - SysUtils, Classes, Controls, Forms, Dialogs, - StdCtrls,Buttons,LResources ; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons; type @@ -30,11 +29,11 @@ var implementation +{$R *.lfm} + uses uni_RegCommon, frm_Readme; - - procedure TfrmMain.FormCreate(Sender: TObject); var ReleaseCodeString: string; @@ -58,7 +57,4 @@ begin end; -initialization -{$i frm_main.lrs} - end. diff --git a/components/onguard/examples/regdemo/frm_readme.lrs b/components/onguard/examples/regdemo/frm_readme.lrs deleted file mode 100644 index 53adec80f..000000000 --- a/components/onguard/examples/regdemo/frm_readme.lrs +++ /dev/null @@ -1,66 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TfrmReadme','FORMDATA',[ - 'TPF0'#10'TfrmReadme'#9'frmReadme'#4'Left'#3#192#0#6'Height'#3#206#1#3'Top'#2 - +'k'#5'Width'#3#24#2#13'ActiveControl'#7#5'Memo1'#7'Caption'#6#10'Readme.txt' - +#12'ClientHeight'#3#206#1#11'ClientWidth'#3#24#2#11'Font.Height'#2#245#9'Fon' - +'t.Name'#6#13'MS Sans Serif'#10'OnActivate'#7#12'FormActivate'#10'LCLVersion' - +#6#7'2.3.0.0'#0#5'TMemo'#5'Memo1'#4'Left'#2#0#6'Height'#3#206#1#3'Top'#2#0#5 - +'Width'#3#24#2#5'Align'#7#8'alClient'#11'Font.Height'#2#244#9'Font.Name'#6#11 - +'Courier New'#13'Lines.Strings'#1#6'&Registration Demo by Bill Mullen [TPX]' - +#6'&--------------------------------------'#6#0#6'_This demo consists of thr' - +'ee applications and complete project code. The three applications are:'#6#0 - +#6#175'RCG.EXE - This is the application you use to gather information from ' - +'your user. That information is then used to generate a release code that y' - +'ou will give back to the user. '#6#0#12#218#1#0#0'REGISTRATION.EXE - A samp' - +'le registration application that your user would run when they are ready to' - +' register their product with you. They enter the serial number that was on ' - +'their disk or CD. When they call you, they will read you their serial numb' - +'er, and the machine identifier (MachineModifier). You will enter this info' - +'rmation into RCG (above) and calculate a release code. You will then read ' - +'them the release code and they will enter it into the Release Code field. ' - +#6#0#6#162'When they click the SAVE button, it validates the release code an' - +'d if it is valid, the serial number and release code are saved to a filecal' - +'led REGISTRATION.DAT. '#6#0#12'2'#2#0#0'HELLOWORLD.EXE - A simple applicati' - +'on that demonstrates the use of the registration information found in the R' - +'EGISTRATION.DAT file that was created by the REGISTRATION.EXE application. ' - +' The serial number stored in the REGISTRATION.DAT file is used to calculate' - +' a release code on the machine the application is running on and it them co' - +'mpares this release code with the one stored in the REGISTRATION.DAT file. ' - +' If the two release codes are the same, the application runs (displays "Hel' - +'lo World") otherwise it informs the user that they have an unregistered dem' - +'o.'#6#0#6#191'An OnGuard.ini file is included that contains the KEY that I ' - +'use in this demo. When running the demo as shipped, you should use the supp' - +'lied OnGuard.ini file when getting the application key.'#6#0#6#128'Before o' - +'pening and modifying any code, you should run the following test to see ho' - +'w these applications work with one another. '#6#0#6'N1. Run the HELLOWORL' - +'D.EXE application. As you can see, it is not registered.'#6#0#6#197'2. Ex' - +'ecute REGISTRATION.EXE. Enter any valid long integer value in the serial n' - +'umber field in the REGISTRATION.EXE application.Execute RCG.EXE and arrange' - +' the windows so that you can view both. '#6#0#6#158'a. In the RCG applica' - +'tion, load the key by pressing the speed button and selecting the Hello Wor' - +'ld application from the OnGuard.ini file that was supplied. '#6#0#6#196'b.' - +' Select the "Apply a Machine Modifier" checkbox and enter the machine modi' - +'fier that is displayed in the REGISTRATION.EXE application (this simulates ' - +'the user reading that information to you). '#6#0#6'Vc. Skip the Expiratio' - +'n portion as I did not use this feature in the other programs. '#6#0#6'od.' - +' Next enter the serial number that is displayed in the REGISTRATION.EXE ap' - +'plication (again, a simulation). '#6#0#6']e. Generate a release code by p' - +'ressing the speed button next to the Release Code edit field.'#6#0#12#149#1 - +#0#0'f. Have the user enter the release code in their REGISTRATION.EXE appl' - +'ication that you read them from your RGC.EXE application (simulated). For ' - +'testing purposes, change any single character as you enter the data so you ' - +'can see how the application will reject an invalid code. (Now simply copy ' - +'and paste the release code from RGC to REGISTRATION to save yourself having' - +' to enter the whole string again.)'#6#0#6#151'If you entered everything cor' - +'rectly, the REGISTRASTION.EXE application will inform you and save the data' - +'. Now let''s test the registration information.'#6#0#6#164'3. Run the HEL' - +'LOWORLD.EXE application. If you entered everything correctly in step 2, yo' - +'u will see that the application is registered (It displays "HELLO WORLD").' - +#6#0#12' '#1#0#0'If you have another computer, copy HELLOWORLD.EXE and REGIS' - +'TRASTION.DAT to that machine and try to execute HELLOWORLD.EXE - you should' - +' be told that the application is an unregistered demo. You can also edit' - +' the any single character in REGISTRASTION.DAT and try to run HELLOWORLD.EX' - +'E. '#0#10'ParentFont'#8#8'ReadOnly'#9#10'ScrollBars'#7#6'ssBoth'#8'TabOrde' - +'r'#2#0#0#0#0 -]); diff --git a/components/onguard/examples/regdemo/frm_readme.pas b/components/onguard/examples/regdemo/frm_readme.pas index 4d9819789..6f61c80ec 100644 --- a/components/onguard/examples/regdemo/frm_readme.pas +++ b/components/onguard/examples/regdemo/frm_readme.pas @@ -5,8 +5,7 @@ unit frm_Readme; interface uses - SysUtils, Classes, Controls, Forms, Dialogs, - StdCtrls,LResources; + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls; type @@ -26,15 +25,12 @@ var implementation - +{$R *.lfm} procedure TfrmReadme.FormActivate(Sender: TObject); begin Memo1.WordWrap := True; end; -initialization -{$i frm_readme.lrs} - end. diff --git a/components/onguard/examples/regdemo/rcg.lpi b/components/onguard/examples/regdemo/rcg.lpi index 964bbcfcf..77790d545 100644 --- a/components/onguard/examples/regdemo/rcg.lpi +++ b/components/onguard/examples/regdemo/rcg.lpi @@ -60,8 +60,8 @@ - - + + @@ -154,7 +154,7 @@ - + @@ -183,6 +183,14 @@ + + + + + + + + diff --git a/components/onguard/examples/regdemo/rcg_main.lrs b/components/onguard/examples/regdemo/rcg_main.lrs deleted file mode 100644 index 6e7910a8f..000000000 --- a/components/onguard/examples/regdemo/rcg_main.lrs +++ /dev/null @@ -1,176 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TrcgMain','FORMDATA',[ - 'TPF0'#8'TrcgMain'#7'rcgMain'#4'Left'#3'b'#1#6'Height'#3'B'#1#3'Top'#3#246#0#5 - +'Width'#3'k'#1#18'HorzScrollBar.Page'#3'j'#1#18'VertScrollBar.Page'#3'A'#1#13 - +'ActiveControl'#7#9'edtAppKey'#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7 - +'Caption'#6#22'Release Code Generator'#12'ClientHeight'#3'B'#1#11'ClientWidt' - +'h'#3'k'#1#8'ShowHint'#9#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#9'lblAppKey' - +#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4 - +'Left'#2#8#6'Height'#2#15#3'Top'#2#8#5'Width'#2'S'#18'BorderSpacing.Left'#2#8 - +#17'BorderSpacing.Top'#2#8#7'Caption'#6#16'&Application Key'#5'Color'#7#6'cl' - +'None'#12'FocusControl'#7#9'edtAppKey'#11'ParentColor'#8#0#0#6'TLabel'#15'lb' - +'lSerialNumber'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Contr' - +'ol'#7#10'edtExpires'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'He' - +'ight'#2#15#3'Top'#3#161#0#5'Width'#2'K'#18'BorderSpacing.Left'#2#8#17'Borde' - +'rSpacing.Top'#2#8#7'Caption'#6#14'&Serial Number'#5'Color'#7#6'clNone'#12'F' - +'ocusControl'#7#15'edtSerialNumber'#11'ParentColor'#8#0#0#6'TLabel'#14'lblRe' - +'leaseCode'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7 - +#6'Bevel1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#15#3 - +'Top'#3#224#0#5'Width'#2'F'#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top' - +#2#8#7'Caption'#6#12'Release Code'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0 - +#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#15'edtSerialNumber'#21'Anc' - +'horSideTop.Control'#7#15'edtSerialNumber'#18'AnchorSideTop.Side'#7#9'asrBot' - +'tom'#23'AnchorSideRight.Control'#7#15'edtSerialNumber'#20'AnchorSideRight.S' - +'ide'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#5#3'Top'#3#211#0#5'Width'#3'I'#1 - +#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#10#5 - +'Shape'#7#9'bsTopLine'#0#0#5'TEdit'#9'edtAppKey'#22'AnchorSideLeft.Control'#7 - +#5'Owner'#21'AnchorSideTop.Control'#7#9'lblAppKey'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#23'AnchorSideRight.Control'#7#9'spdAppKey'#4'Left'#2#8#6'Height' - +#2#24#3'Top'#2#25#5'Width'#3''''#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRigh' - +'t'#0#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2#2#19'BorderSpacing.' - +'Right'#2#4#10'Font.Color'#7#5'clRed'#11'Font.Height'#2#243#9'Font.Name'#6#13 - +'MS Sans Serif'#8'OnChange'#7#15'edtAppKeyChange'#10'ParentFont'#8#8'ReadOnl' - +'y'#9#7'TabStop'#8#8'TabOrder'#2#0#0#0#9'TCheckBox'#10'chkMachMod'#22'Anchor' - +'SideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'edtAppKey'#18'An' - +'chorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#19#3'Top'#2'9'#5'W' - +'idth'#3#155#0#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2#8#7'Captio' - +'n'#6#25'Apply a &Machine Modifier'#7'OnClick'#7#15'chkMachModClick'#8'TabOr' - +'der'#2#2#0#0#5'TEdit'#13'edtMachineMod'#22'AnchorSideLeft.Control'#7#5'Owne' - +'r'#21'AnchorSideTop.Control'#7#10'chkMachMod'#18'AnchorSideTop.Side'#7#9'as' - +'rBottom'#4'Left'#2#8#6'Height'#2#23#3'Top'#2'N'#5'Width'#3'I'#1#18'BorderSp' - +'acing.Left'#2#8#17'BorderSpacing.Top'#2#2#19'BorderSpacing.Right'#2#8#7'Ena' - +'bled'#8#9'MaxLength'#2#10#8'OnChange'#7#15'edtAppKeyChange'#8'TabOrder'#2#3 - +#0#0#5'TEdit'#15'edtSerialNumber'#22'AnchorSideLeft.Control'#7#5'Owner'#21'A' - +'nchorSideTop.Control'#7#15'lblSerialNumber'#18'AnchorSideTop.Side'#7#9'asrB' - +'ottom'#4'Left'#2#8#6'Height'#2#23#3'Top'#3#178#0#5'Width'#3'I'#1#18'BorderS' - +'pacing.Left'#2#8#17'BorderSpacing.Top'#2#2#9'MaxLength'#2#10#8'OnChange'#7 - +#15'edtAppKeyChange'#8'TabOrder'#2#6#0#0#5'TEdit'#14'edtReleaseCode'#22'Anch' - +'orSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#14'lblReleaseCod' - +'e'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#14's' - +'pdReleaseCode'#4'Left'#2#8#6'Height'#2#23#3'Top'#3#241#0#5'Width'#3'+'#1#7 - +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#8#17'B' - +'orderSpacing.Top'#2#2#19'BorderSpacing.Right'#2#4#8'ReadOnly'#9#7'TabStop'#8 - +#8'TabOrder'#2#7#0#0#7'TButton'#7'btnExit'#21'AnchorSideTop.Control'#7#9'btn' - +'Readme'#23'AnchorSideRight.Control'#7#13'edtMachineMod'#20'AnchorSideRight.' - +'Side'#7#9'asrBottom'#4'Left'#3#6#1#6'Height'#2#25#3'Top'#3#20#1#5'Width'#2 - +'K'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#25'BorderSpacing.InnerBord' - +'er'#2#4#7'Caption'#6#4'Exit'#7'Default'#9#7'OnClick'#7#12'btnExitClick'#8'T' - +'abOrder'#2#9#0#0#9'TCheckBox'#10'chkExpires'#22'AnchorSideLeft.Control'#7#5 - +'Owner'#21'AnchorSideTop.Control'#7#13'edtMachineMod'#18'AnchorSideTop.Side' - +#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#19#3'Top'#2'm'#5'Width'#3#129#0#18'B' - +'orderSpacing.Left'#2#8#17'BorderSpacing.Top'#2#8#7'Caption'#6#22'&Release c' - +'ode expires '#7'OnClick'#7#15'chkExpiresClick'#8'TabOrder'#2#4#0#0#5'TEdit' - +#10'edtExpires'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Contr' - +'ol'#7#10'chkExpires'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'He' - +'ight'#2#23#3'Top'#3#130#0#5'Width'#3'I'#1#18'BorderSpacing.Left'#2#8#17'Bor' - +'derSpacing.Top'#2#2#7'Enabled'#8#8'OnChange'#7#15'edtAppKeyChange'#8'TabOrd' - ,'er'#2#5#0#0#7'TBitBtn'#9'spdAppKey'#21'AnchorSideTop.Control'#7#9'edtAppKey' - +#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#13'edtM' - +'achineMod'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3'3'#1#6'Height' - +#2#26#3'Top'#2#24#5'Width'#2#30#7'Anchors'#11#5'akTop'#7'akRight'#0#10'Glyph' - +'.Data'#10'*'#4#0#0'&'#4#0#0'BM&'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#18#0#0#0#18 - +#0#0#0#1#0#24#0#0#0#0#0#240#3#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#0#0#255#255#255#171#171 - +#171#238#238#238#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#0#0#255#255#255#23'%4^em'#242 - +#242#242#229#229#229#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#0#0#255#255#255'0>M8T`'#196#196#196',06'#170#170#170 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#0#0#255 - +#255#255#162#162#162#0#141#176'2^j'#0#27'9'#139#139#139#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#0#0#191#191#191'III'#0'Bn'#0 - +'u'#170#12')I'#202#202#202#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#0#0#0'^s'#0'u'#158#0'(B'#0'-O'#22'(:'#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#0#0#168#177 - +#179':s'#129#0'|'#160#0'r'#157#14'1E'#162#162#162#204#204#204#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#221#221#221#162#162 - +#162#179#179#179#255#255#255#255#255#255#0#0#255#255#255#238#238#238#170#181 - +#183'8o}'#0#129#166#0'_'#139#20'8U'#172#173#175#242#242#242#255#255#255#255 - +#255#255#255#255#255#255#255#255'0N^'#0'k'#137#8'Vv'#140#145#150#255#255#255 - +#0#0#255#255#255#255#255#255#255#255#255#242#242#242#172#177#179#20'{'#151#0 - +'>j'#0'W~8Xg'#170#175#178#212#212#212#255#255#255#170#170#170#6'8S'#151#156 - +#159'K'#129#143#18'Uh'#234#234#234#0#0#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#204#204#204#162#162#162'#hx'#4#140#181#0'\'#130#8'3' - +'R'#168#170#172'2O_:Tb'#238#238#238#208#208#208#0'p'#139#139#139#139#0#0#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#160#160#160'%v'#139#0'u'#170#0'3['#0'Ku\ej'#255#255#255#208 - +#208#208#0'A\'#139#139#139#0#0#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#229#229#229 - +'sss4r'#128#0#129#167'\jn'#255#255#255'E`j'#0'P'#127#139#139#139#0#0#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#242#242#242#0'^s\os'#255#255 - +#255'x'#143#149#0'd'#141#139#139#139#0#0#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255'q'#131#134#16'p'#134#217#217#217#208#208#208 - +#0'7U'#139#139#139#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#160#160#160#4'c|'#183#185#186#208#208#208#0'7U'#139#139#139 - +#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255'#Sc'#25'}'#151'Lak'#14'/F'#212#212#212#0#0#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#213#213#213#25'fx'#0 - +'Ukbs|'#255#255#255#0#0#7'OnClick'#7#14'spdAppKeyClick'#7'Spacing'#2#0#8'Tab' - +'Order'#2#1#0#0#7'TBitBtn'#14'spdReleaseCode'#21'AnchorSideTop.Control'#7#14 - +'edtReleaseCode'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Co' - +'ntrol'#7#13'edtMachineMod'#4'Left'#3'7'#1#6'Height'#2#26#3'Top'#3#239#0#5'W' - +'idth'#2#30#7'Anchors'#11#5'akTop'#0#10'Glyph.Data'#10'*'#4#0#0'&'#4#0#0'BM&' - +#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#18#0#0#0#18#0#0#0#1#0#24#0#0#0#0#0#240#3#0#0 - +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#234#234#234#134#140#141#0'Wo'#23'7]fmfpwp'#147#149#147#0#0#255 - +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#185#185#185'"Q^-)'#130']W'' '#30'lGC'#191#143#144#191#147#144'k?.-'#138'logIDY@;' - +#207#168#173#255#224#228#255#213#218#143'ut'#143'TQ'#6#140#176'Akw'#129#135 - +#129'Y'#154#248#0'3'#128'MQM'#192#195#192#0#0')'#20#20'O''&'#138'im'#255#200 - +#207#183#143#148'^FE'#228#178#185#255#203#210#255#227#230#143'ptP/-'#142#165 - +#163':'#251#251'p'#173#168#167#172#167'e'#134#182'MQM'#192#195#192#0#0#28#14 - +#14'B! 4'#28#27'~cf'#255#200#207#237#175#179#235#179#184#175#137#142#175#141 - +#145#241#213#217#223#186#191'}'#128#128'7'#184#182#8#248#248'^pkZ^ZW]W'#192 - +#195#192#0#0'8%#'#171'hc'#191'qk'#195'to'#255#177#177#213#164#168'[>>L)''kMG' - +'r\Z'#241#210#213#243#206#211'yyy/\Z'#182'ojZLK'#219#220#219#239#240#239#0#0 - +'oB>'#212#132'}'#235#142#135#255#151#144#255#151#144#195#129'~E(''\/.lA>Q;8' - +#235#190#195#255#223#227#255#213#218#255#185#180#255#151#144'o\Z'#255#255#255 - +#255#255#255#0#0'7!'#31#127'KH`>:'#135'PL'#255#151#144#255#151#144#222#151 - +#151#127'cg'#127'cg'#255#186#189#255#200#207#231#186#192#127'np'#127'qs'#127 - +'NKWNM'#255#255#255#255#255#255#0#0#239#239#239#164#164#164#161'_[xHD'#234 - +#141#134#218#129'{'#237#141#134#255#175#175#255#200#207#213#153#155#189#144 - +#149#252#197#204#152'vyG*('#224#224#224#243#243#243#255#255#255#255#255#255#0 - +#0#255#255#255#175#175#175'e<9'#235#139#133#181'rlF98'#207'zu'#255#152#145 - +#255#175#175#143'pt'#151#148#148#183#147#151#248#194#201'G8:'#239#239#239#255 - +#255#255#255#255#255#255#255#255#0#0#255#255#255#230#230#230#148'qn'#216#128 - +'z'#143#127'~'#154#154#154#207'zu'#255#151#144#255#151#144#143']\'#223#223 - +#223#183#180#180'sce'#175#175#175#250#250#250#255#255#255#255#255#255#255#255 - +#255#0#0#255#255#255#255#255#255#234#234#234#150#150#150#255#255#255#159#159 - +#159'Z53oB>oB>>%#'#223#223#223#255#255#255#255#255#255#255#255#255#255#255 - +#255#255#255#255#255#255#255#255#255#255#0#0#7'OnClick'#7#19'spdReleaseCodeC' - +'lick'#7'Spacing'#2#0#8'TabOrder'#2#8#0#0#7'TButton'#9'btnReadme'#22'AnchorS' - +'ideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#14'edtReleaseCode' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#25#3'Top'#3#20 - +#1#5'Width'#2'K'#18'BorderSpacing.Left'#2#8#17'BorderSpacing.Top'#2#12#20'Bo' - +'rderSpacing.Bottom'#2#8#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#9'Re' - +'adme...'#7'OnClick'#7#14'btnReadmeClick'#8'TabOrder'#2#10#0#0#11'TOgMakeKey' - +'s'#11'OgMakeKeys1'#4'Left'#3#152#0#3'Top'#3#248#0#0#0#0 -]); diff --git a/components/onguard/examples/regdemo/rcg_main.pas b/components/onguard/examples/regdemo/rcg_main.pas index 058e225f8..c0084b4b3 100644 --- a/components/onguard/examples/regdemo/rcg_main.pas +++ b/components/onguard/examples/regdemo/rcg_main.pas @@ -5,8 +5,8 @@ unit rcg_Main; interface uses - SysUtils, Classes,Controls, Forms, Dialogs, - Buttons, StdCtrls,LResources, OnGuard, OgUtil, ExtCtrls; + SysUtils, Classes, Controls, Forms, Dialogs, Buttons, StdCtrls, ExtCtrls, + OnGuard, OgUtil; type @@ -54,7 +54,7 @@ var implementation - +{$R *.lfm} uses frm_Readme; @@ -155,7 +155,4 @@ begin end; -initialization -{$i rcg_main.lrs} - end. diff --git a/components/onguard/examples/regdemo/reg_main.lrs b/components/onguard/examples/regdemo/reg_main.lrs deleted file mode 100644 index 67f001626..000000000 --- a/components/onguard/examples/regdemo/reg_main.lrs +++ /dev/null @@ -1,50 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TregMain','FORMDATA',[ - 'TPF0'#8'TregMain'#7'regMain'#4'Left'#3#212#1#6'Height'#3#5#1#3'Top'#3#153#0#5 - +'Width'#3','#1#18'HorzScrollBar.Page'#3'+'#1#18'VertScrollBar.Page'#3#4#1#13 - +'ActiveControl'#7#9'edtSerial'#8'AutoSize'#9#11'BorderStyle'#7#8'bsDialog'#7 - +'Caption'#6#18'Registration Tools'#12'ClientHeight'#3#5#1#11'ClientWidth'#3 - +','#1#10'OnActivate'#7#12'FormActivate'#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLab' - +'el'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#18'AnchorSideTop.Side'#7 - +#9'asrBottom'#4'Left'#2#10#6'Height'#2#15#3'Top'#2'C'#5'Width'#3#204#0#18'Bo' - +'rderSpacing.Left'#2#10#7'Caption'#6'%Enter your serial number from your CD' - +#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#22'AnchorSid' - +'eLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'edtSerial'#18'Ancho' - +'rSideTop.Side'#7#9'asrBottom'#4'Left'#2#10#6'Height'#2#15#3'Top'#2's'#5'Wid' - +'th'#2'`'#18'BorderSpacing.Left'#2#10#17'BorderSpacing.Top'#2#8#7'Caption'#6 - +#18'Machine Identifier'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel' - +#6'Label3'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7 - +#10'edtMachine'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#10#6'Height' - +#2#15#3'Top'#3#163#0#5'Width'#3#229#0#18'BorderSpacing.Left'#2#10#17'BorderS' - +'pacing.Top'#2#8#7'Caption'#6'+Enter the release code you were given by us'#5 - +'Color'#7#6'clNone'#11'ParentColor'#8#0#0#5'TEdit'#9'edtSerial'#22'AnchorSid' - +'eLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#6'Label1'#18'AnchorSi' - +'deTop.Side'#7#9'asrBottom'#4'Left'#2#10#6'Height'#2#23#3'Top'#2'T'#5'Width' - +#3#12#1#18'BorderSpacing.Left'#2#10#17'BorderSpacing.Top'#2#2#19'BorderSpaci' - +'ng.Right'#2#10#9'MaxLength'#2#10#8'TabOrder'#2#0#0#0#5'TEdit'#10'edtMachine' - +#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#6'Label2' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#10#6'Height'#2#23#3'Top'#3 - +#132#0#5'Width'#3#12#1#18'BorderSpacing.Left'#2#10#17'BorderSpacing.Top'#2#2 - +#8'ReadOnly'#9#7'TabStop'#8#8'TabOrder'#2#1#0#0#5'TEdit'#10'edtRelease'#22'A' - +'nchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#6'Label3'#18 - +'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#10#6'Height'#2#23#3'Top'#3#180 - +#0#5'Width'#3#12#1#18'BorderSpacing.Left'#2#10#17'BorderSpacing.Top'#2#2#9'M' - +'axLength'#2#19#8'TabOrder'#2#2#0#0#7'TButton'#7'btnSave'#21'AnchorSideTop.C' - +'ontrol'#7#9'btnReadme'#23'AnchorSideRight.Control'#7#10'edtRelease'#20'Anch' - +'orSideRight.Side'#7#9'asrBottom'#4'Left'#3#203#0#6'Height'#2#25#3'Top'#3#215 - +#0#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Bottom' - +#2#10#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Save'#7'OnClick'#7#12 - +'btnSaveClick'#8'TabOrder'#2#3#0#0#7'TButton'#9'btnReadme'#22'AnchorSideLeft' - +'.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#10'edtRelease'#18'AnchorSi' - +'deTop.Side'#7#9'asrBottom'#4'Left'#2#10#6'Height'#2#25#3'Top'#3#215#0#5'Wid' - +'th'#2'K'#18'BorderSpacing.Left'#2#10#17'BorderSpacing.Top'#2#12#25'BorderSp' - +'acing.InnerBorder'#2#4#7'Caption'#6#9'Readme...'#7'OnClick'#7#14'btnReadmeC' - +'lick'#8'TabOrder'#2#4#0#0#6'TLabel'#5'Memo1'#22'AnchorSideLeft.Control'#7#5 - +'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#9 - +'edtSerial'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#10#6'Height'#2 - +'-'#3'Top'#2#10#5'Width'#3#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0 - +#20'BorderSpacing.Around'#2#10#7'Caption'#6'jThank you for registering Hello' - +'World. To complete your registration, please contact us at (800) 555-1212.' - +#5'Color'#7#9'clBtnFace'#11'ParentColor'#8#8'WordWrap'#9#0#0#0 -]); diff --git a/components/onguard/examples/stampexe/stampex1.lfm b/components/onguard/examples/stampexe/stampex1.lfm index 8c87776f6..ae8bede5b 100644 --- a/components/onguard/examples/stampexe/stampex1.lfm +++ b/components/onguard/examples/stampexe/stampex1.lfm @@ -51,6 +51,7 @@ object frmStamp: TfrmStamp Top = 31 Width = 305 BorderSpacing.Top = 4 + BorderSpacing.Right = 4 OnChange = FileEdChange TabOrder = 0 end @@ -59,7 +60,7 @@ object frmStamp: TfrmStamp AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = FileEd AnchorSideTop.Side = asrCenter - Left = 317 + Left = 321 Height = 25 Hint = 'Search for EXE file' Top = 30 @@ -90,7 +91,7 @@ object frmStamp: TfrmStamp AnchorSideTop.Side = asrBottom AnchorSideRight.Control = BrowseBtn AnchorSideRight.Side = asrBottom - Left = 317 + Left = 321 Height = 25 Top = 103 Width = 64 diff --git a/components/onguard/examples/stampexe/stampex1.lrs b/components/onguard/examples/stampexe/stampex1.lrs deleted file mode 100644 index 8486d68df..000000000 --- a/components/onguard/examples/stampexe/stampex1.lrs +++ /dev/null @@ -1,50 +0,0 @@ -{ This is an automatically generated lazarus resource file } - -LazarusResources.Add('TfrmStamp','FORMDATA',[ - 'TPF0'#9'TfrmStamp'#8'frmStamp'#4'Left'#3#26#1#6'Height'#3#160#0#3'Top'#3#192 - +#0#5'Width'#3#172#1#18'HorzScrollBar.Page'#3#171#1#19'HorzScrollBar.Range'#3 - +#153#1#18'VertScrollBar.Page'#3#159#0#19'VertScrollBar.Range'#3#130#0#13'Act' - +'iveControl'#7#6'FileEd'#8'AutoSize'#9#7'Caption'#6#9'Stamp EXE'#12'ClientHe' - +'ight'#3#160#0#11'ClientWidth'#3#172#1#8'OnCreate'#7#10'FormCreate'#8'ShowHi' - +'nt'#9#10'LCLVersion'#6#7'2.3.0.0'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.C' - +'ontrol'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#12#6'Heig' - +'ht'#2#15#3'Top'#2#12#5'Width'#2'X'#18'BorderSpacing.Left'#2#12#17'BorderSpa' - +'cing.Top'#2#12#7'Caption'#6#18'&EXE file to stamp'#5'Color'#7#6'clNone'#12 - +'FocusControl'#7#6'FileEd'#11'ParentColor'#8#0#0#6'TLabel'#9'StatusLbl'#22'A' - +'nchorSideLeft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7#8'CloseBtn' - +#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#12#6'Height'#2#15#3'Top'#2 - +'l'#5'Width'#2' '#7'Caption'#6#6'Status'#5'Color'#7#6'clNone'#11'ParentColor' - +#8#0#0#5'TEdit'#6'FileEd'#22'AnchorSideLeft.Control'#7#6'Label1'#21'AnchorSi' - +'deTop.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2 - +#12#6'Height'#2#23#4'Hint'#6#19'Enter EXE file name'#3'Top'#2#31#5'Width'#3 - +'1'#1#17'BorderSpacing.Top'#2#4#8'OnChange'#7#12'FileEdChange'#8'TabOrder'#2 - +#0#0#0#7'TBitBtn'#9'BrowseBtn'#22'AnchorSideLeft.Control'#7#6'FileEd'#19'Anc' - +'horSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#6'FileEd'#18'A' - +'nchorSideTop.Side'#7#9'asrCenter'#4'Left'#3'='#1#6'Height'#2#25#4'Hint'#6#19 - +'Search for EXE file'#3'Top'#2#30#5'Width'#2'@'#8'AutoSize'#9#19'BorderSpaci' - +'ng.Right'#2#12#7'Caption'#6#7'&Browse'#7'OnClick'#7#14'BrowseBtnClick'#8'Ta' - +'bOrder'#2#1#0#0#7'TBitBtn'#8'StampBtn'#22'AnchorSideLeft.Control'#7#6'Label' - +'1'#21'AnchorSideTop.Control'#7#6'FileEd'#18'AnchorSideTop.Side'#7#9'asrBott' - +'om'#4'Left'#2#12#6'Height'#2#25#4'Hint'#6#31'Stamp EXE wiht signature recor' - +'d'#3'Top'#2'B'#5'Width'#2'Y'#17'BorderSpacing.Top'#2#12#7'Caption'#6#6'&Sta' - +'mp'#7'OnClick'#7#13'StampBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#8'CloseBt' - +'n'#22'AnchorSideLeft.Control'#7#9'BrowseBtn'#21'AnchorSideTop.Control'#7#8 - +'StampBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control' - +#7#9'BrowseBtn'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3'='#1#6'Hei' - +'ght'#2#25#3'Top'#2'g'#5'Width'#2'@'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRi' - +'ght'#0#17'BorderSpacing.Top'#2#12#20'BorderSpacing.Bottom'#2#12#4'Kind'#7#7 - +'bkClose'#8'TabOrder'#2#3#0#0#7'TBitBtn'#8'ClearBtn'#22'AnchorSideLeft.Contr' - +'ol'#7#8'StampBtn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.C' - +'ontrol'#7#8'StampBtn'#4'Left'#2'k'#6'Height'#2#25#4'Hint'#6#29'Reset EXE''s' - +' stamped signature'#3'Top'#2'B'#5'Width'#2'Y'#18'BorderSpacing.Left'#2#6#7 - +'Caption'#6#6'&Clear'#7'OnClick'#7#13'ClearBtnClick'#8'TabOrder'#2#4#0#0#9'T' - +'CheckBox'#13'EraseMarkerCb'#22'AnchorSideLeft.Control'#7#5'Owner'#19'Anchor' - +'SideLeft.Side'#7#9'asrCenter'#21'AnchorSideTop.Control'#7#6'Label1'#18'Anch' - +'orSideTop.Side'#7#9'asrCenter'#4'Left'#3#172#0#6'Height'#2#19#4'Hint'#6',Er' - +'ase marker used to locate signature record'#3'Top'#2#10#5'Width'#2'U'#7'Cap' - +'tion'#6#13'Erase &Marker'#8'TabOrder'#2#5#0#0#11'TOpenDialog'#11'OpenDialog' - +'1'#5'Title'#6#24'Select EXE File to Stamp'#10'DefaultExt'#6#4'.exe'#6'Filte' - +'r'#6'>EXE files (*.exe)|*.exe|All files (*.*)|*.*|Linux executable|*'#11'Fi' - +'lterIndex'#2#0#7'Options'#11#14'ofHideReadOnly'#15'ofPathMustExist'#15'ofFi' - +'leMustExist'#0#4'Left'#3#128#0#3'Top'#2#8#0#0#0 -]); diff --git a/components/onguard/examples/stampexe/stampex1.pas b/components/onguard/examples/stampexe/stampex1.pas index a7a9fbd8f..e4eca516b 100644 --- a/components/onguard/examples/stampexe/stampex1.pas +++ b/components/onguard/examples/stampexe/stampex1.pas @@ -3,8 +3,7 @@ unit STAMPEX1; interface uses - SysUtils, Classes, - Controls, Forms, Dialogs, StdCtrls, Buttons, LResources, + SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, Buttons, ogproexe; type @@ -37,7 +36,7 @@ var implementation - +{$R *.lfm} procedure TfrmStamp.BrowseBtnClick(Sender: TObject); begin @@ -80,7 +79,4 @@ begin StatusLbl.Caption := 'Invalid filename'; end; -initialization -{$i stampex1.lrs} - end. diff --git a/components/onguard/examples/stampexe/stampexe.lpi b/components/onguard/examples/stampexe/stampexe.lpi index 537c17f23..2c1363a4c 100644 --- a/components/onguard/examples/stampexe/stampexe.lpi +++ b/components/onguard/examples/stampexe/stampexe.lpi @@ -58,7 +58,8 @@ - + + @@ -99,7 +100,12 @@ - + + + + + +