diff --git a/DataLock_Archive.ldk b/Archive/DataLock_Archive.ldk
similarity index 100%
rename from DataLock_Archive.ldk
rename to Archive/DataLock_Archive.ldk
diff --git a/Bin/DataLock.exe b/Bin/DataLock.exe
new file mode 100644
index 0000000..635c0ee
Binary files /dev/null and b/Bin/DataLock.exe differ
diff --git a/DataLock.INI b/DataLock.INI
new file mode 100644
index 0000000..b83d427
--- /dev/null
+++ b/DataLock.INI
@@ -0,0 +1,28 @@
+[General]
+Exists=1
+
+[View]
+CSize=0
+CMethod=0
+CRatio=0
+CRC=0
+EFA=0
+IFA=0
+Encryption=0
+TimeStamp=0
+USize=0
+MadeBy=0
+Needed=0
+Comment=0
+Hierarchy=1
+
+[Preferences]
+BaseDirectory=C:\Users\rinor\Downloads\LDK
+Confirmations=0
+CompressionMethodToUse=2
+DeflationOption=2
+CreateDirs=1
+RestorePath=1
+StripPath=0
+RemoveDots=1
+Recurse=1
diff --git a/DataLock.ctpr b/DataLock.ctpr
new file mode 100644
index 0000000..88b2738
--- /dev/null
+++ b/DataLock.ctpr
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DataLock.ctps b/DataLock.ctps
new file mode 100644
index 0000000..25146a2
--- /dev/null
+++ b/DataLock.ctps
@@ -0,0 +1,335 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DataLock.ico b/DataLock.ico
new file mode 100644
index 0000000..5d67e1b
Binary files /dev/null and b/DataLock.ico differ
diff --git a/DataLock.ppr b/DataLock.ppr
new file mode 100644
index 0000000..24cb5d0
--- /dev/null
+++ b/DataLock.ppr
@@ -0,0 +1,55 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+program DataLock;
+ {$mode objfpc}{$H+}
+
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Interfaces, // this includes the LCL widgetset
+ Forms,
+ ubasedlg ,
+ udemodlg ,
+ dgAbout ,
+ UMain, unit2,unit_open,unit_crypt,fmwriter,fmreader,unit_crea_apri, onguardstarter, unit_pin
+ { you can add units after this };
+
+{$R *.res}
+
+begin
+ RequireDerivedFormResource := True;
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.CreateForm(TForm2, Form2);
+ Application.CreateForm(TBaseDirDlg, BaseDirDlg);
+ Application.CreateForm(Tform_open, form_open);
+ Application.CreateForm(Tform_crypt, form_crypt);
+ Application.CreateForm(TWriterForm, WriterForm);
+ Application.CreateForm(TformPin, formPin);
+ Application.CreateForm(TReaderForm, ReaderForm);
+ Application.CreateForm(Tform_creaapri, form_creaapri);
+
+ OnGuard_Init; //==== INIT OnGuard Engine ======================
+ Application.Run;
+ OnGuard_Stop; //==== STOP OnGuard Engine ======================
+end.
diff --git a/DataLock.res b/DataLock.res
new file mode 100644
index 0000000..5ae4ab0
Binary files /dev/null and b/DataLock.res differ
diff --git a/FmReader.frm b/FmReader.frm
new file mode 100644
index 0000000..ec35a61
--- /dev/null
+++ b/FmReader.frm
@@ -0,0 +1,119 @@
+object ReaderForm: TReaderForm
+ Left = 387
+ Height = 336
+ Top = 242
+ Width = 629
+ BorderStyle = bsToolWindow
+ Caption = 'Payload Reader Demo: Reader.exe'
+ ClientHeight = 336
+ ClientWidth = 629
+ Color = clBtnFace
+ DesignTimePPI = 120
+ Font.Color = clWindowText
+ Font.Height = -14
+ Font.Name = 'MS Sans Serif'
+ OnCreate = FormCreate
+ Position = poScreenCenter
+ LCLVersion = '7.7'
+ object lblHelp: TLabel
+ Left = 0
+ Height = 65
+ Top = 0
+ Width = 629
+ Align = alTop
+ AutoSize = False
+ Caption = 'This program displays the data (if any) attached as a payload to the program file. The length of any data is also displayed.'
+ Color = clBtnHighlight
+ Font.Color = clWindowText
+ Font.Height = -16
+ Font.Name = 'MS Sans Serif'
+ ParentFont = False
+ Transparent = False
+ WordWrap = True
+ end
+ object lblSize: TLabel
+ Left = 0
+ Height = 16
+ Top = 280
+ Width = 40
+ Caption = 'lblSize'
+ end
+ object memData: TMemo
+ Left = 0
+ Height = 96
+ Top = 65
+ Width = 629
+ Align = alTop
+ ParentColor = True
+ ReadOnly = True
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ object btnClose: TButton
+ Left = 506
+ Height = 31
+ Top = 300
+ Width = 94
+ Caption = '&Close'
+ OnClick = btnCloseClick
+ TabOrder = 1
+ end
+ object Button1: TButton
+ Left = 0
+ Height = 31
+ Top = 300
+ Width = 94
+ Caption = 'Controlla file'
+ OnClick = Button1Click
+ TabOrder = 2
+ end
+ object Button2: TButton
+ Left = 110
+ Height = 31
+ Top = 300
+ Width = 160
+ Caption = 'Controlla con decrypt'
+ OnClick = Button2Click
+ TabOrder = 3
+ end
+ object editpin: TLabeledEdit
+ Left = 0
+ Height = 24
+ Top = 210
+ Width = 100
+ EditLabel.Height = 16
+ EditLabel.Width = 100
+ EditLabel.Caption = 'PIN'
+ TabOrder = 4
+ end
+ object editcodserial: TLabeledEdit
+ Left = 120
+ Height = 24
+ Top = 210
+ Width = 240
+ EditLabel.Height = 16
+ EditLabel.Width = 240
+ EditLabel.Caption = 'CODICE SERIALE DEL FILE'
+ TabOrder = 5
+ end
+ object editcodregistraz: TLabeledEdit
+ Left = 380
+ Height = 24
+ Top = 210
+ Width = 240
+ EditLabel.Height = 16
+ EditLabel.Width = 240
+ EditLabel.Caption = 'CODICE REGISTRAZIONE DEL FILE'
+ TabOrder = 6
+ end
+ object editcodapp: TLabeledEdit
+ Left = 120
+ Height = 24
+ Top = 260
+ Width = 240
+ EditLabel.Height = 16
+ EditLabel.Width = 240
+ EditLabel.Caption = 'CODICE APPLICAZIONE DEL FILE'
+ TabOrder = 7
+ end
+end
diff --git a/FmReader.pas b/FmReader.pas
new file mode 100644
index 0000000..c9f62ad
--- /dev/null
+++ b/FmReader.pas
@@ -0,0 +1,248 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+
+unit FmReader;
+
+{$MODE Delphi}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, ExtCtrls;
+
+type
+
+ { TReaderForm }
+
+ TReaderForm = class(TForm)
+ Button1: TButton;
+ Button2: TButton;
+ editcodapp: TLabeledEdit;
+ editcodregistraz: TLabeledEdit;
+ editpin: TLabeledEdit;
+ editcodserial: TLabeledEdit;
+ memData: TMemo;
+ btnClose: TButton;
+ lblHelp: TLabel;
+ lblSize: TLabel;
+ procedure btnCloseClick(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ var cReaderFile, pin, codseriale, codregistrazione :string;
+ PayloadPresent :boolean;
+ end;
+
+var
+ ReaderForm: TReaderForm;
+
+implementation
+
+uses
+ UPayload,md5,unit_crypt,umain, unit_pin;
+
+{$R *.frm}
+
+procedure TReaderForm.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TReaderForm.Button1Click(Sender: TObject);
+var
+ PL: TPayload;
+ DataStr: string;
+begin
+
+ PL := TPayload.Create(cReaderFile);
+ try
+ if PL.HasPayload then
+ begin
+ lblSize.Caption := Format('Payload data size = %d', [PL.PayloadSize]);
+ SetLength(DataStr, PL.PayloadSize);
+ PL.GetPayload(PChar(DataStr)^);
+
+// form_crypt.strsorg.Text:=DataStr;
+// form_crypt.btnDecrypt1click(sender);
+
+// memData.Text := form_crypt.strdest.Text;
+// memData.Text := copy(DataStr,0,6); // lunghezza nome sigillo per Eureka
+// memData.Text := copy(DataStr,0,11); // lunghezza nome sigillo per SecureDrive
+ memData.Text := copy(DataStr,0,7); // lunghezza nome sigillo per DataLck
+
+ form_crypt.strsorg.Text:=copy(DataStr,pos('-',DataStr)+1,length(DataStr));
+ form_crypt.btnDecrypt1click(sender);
+ editcodserial.Text:=form_crypt.strdest.Text;
+
+ //if MD5Print(MD5String(memdata.Lines[0])) = memdata.Lines[1] then showmessage('match') else showmessage('not match');
+ end
+ else
+ begin
+ lblSize.Caption := 'No payload present';
+ lblSize.Font.Style := [fsBold];
+ end;
+ finally
+ PL.Free;
+ end;
+
+end;
+
+procedure TReaderForm.Button2Click(Sender: TObject);
+var
+ PL: TPayload;
+ DataStr: string;
+ pos1,pos2,pos3:integer;
+begin
+
+ PayloadPresent:=false;
+
+ PL := TPayload.Create(cReaderFile);
+ try
+ if PL.HasPayload then
+ begin
+ lblSize.Caption := Format('Payload data size = %d', [PL.PayloadSize]);
+ SetLength(DataStr, PL.PayloadSize);
+ PL.GetPayload(PChar(DataStr)^);
+ //showmessage('chiave eureka pre decrypt '+DataStr);
+
+ form_crypt.strsorg.Text:=copy(DataStr,0,pos('-',DataStr)-1);
+ form_crypt.btnDecrypt1click(sender);
+ editpin.Text := form_crypt.strdest.Text;
+ // showmessage('pin '+form_crypt.strdest.Text);
+
+ if formPin.showmodal= mrOk then begin
+ pin:=formPin.pwd.Text;
+ end;
+
+ // InputQuery('PIN Secure Drive', '', TRUE, pin);
+
+
+ if pin <> editpin.Text then begin
+ showmessage('Pin not recognized!');
+
+ application.Terminate;
+
+ end;
+
+ PayloadPresent:=true; // payload presente e codice pin corretto
+
+
+
+ //form_crypt.ShowModal;
+
+
+// form_crypt.strsorg.Text:=copy(DataStr,pos('-',DataStr)+1,length(DataStr));
+ pos1:=pos('-',DataStr);
+ pos2:=pos('{',DataStr);
+ pos2:=pos2-pos1;
+
+
+ //showmessage('- '+inttostr(pos1)+' { '+inttostr(pos2)+' } '+inttostr(pos3));
+ form_crypt.strsorg.Text:=copy(DataStr,pos1+1,pos2-1);
+ form_crypt.btnDecrypt1click(sender);
+
+ //showmessage('chiave eureka pre decrypt '+form_crypt.strsorg.Text);
+ //showmessage('chiave eureka post decrypt '+form_crypt.strdest.Text);
+ //memData.Text := form_crypt.strdest.Text; // imposta chiave a quella decodificata
+ memData.Text := form_crypt.strsorg.Text; // imposta chiave a quella criptata
+
+ editcodserial.Text := form_crypt.strdest.Text;
+
+ codseriale:=form_crypt.strdest.Text;;
+
+// form_crypt.strsorg.Text:=copy(DataStr,pos('{',DataStr)+1,length(DataStr));
+// form_crypt.btnDecrypt1click(sender);
+// editcodregistraz.Text := form_crypt.strdest.Text;
+
+ pos3:=pos('}',DataStr);
+ pos2:=pos('{',DataStr);
+ pos3:=pos3-pos2;
+
+ editcodregistraz.Text:=copy(DataStr,pos('{',DataStr)+1,pos3-1);
+ //showmessage('cod registrazione '+editcodregistraz.Text);
+
+ codregistrazione:=editcodregistraz.Text;
+
+
+ form_crypt.strsorg.Text:=copy(DataStr,pos('}',DataStr)+1,length(DataStr));
+ form_crypt.btnDecrypt1click(sender);
+ editcodapp.Text := form_crypt.strdest.Text;
+ //showmessage('cod applicazione '+editcodapp.Text);
+
+ showmessage('cod app '+editcodapp.text+' cod licenza '+editcodserial.Text);
+
+ if MD5Print(MD5String(trim(editcodapp.text))) <> editcodserial.Text then begin
+ showmessage('Questa copia è stata manomessa! Impossibile usarla.');
+ application.terminate;
+ end;
+
+// show;
+
+ form1.OgDaysCode1.AutoDecrease:=true;
+ form1.OgDaysCode1.AutoCheck:=true;
+ form1.OgDaysCode1.CheckCode(true);
+
+
+
+//exit;
+// memData.Text := DataStr;
+ //if MD5Print(MD5String(memdata.Lines[0])) = memdata.Lines[1] then showmessage('match') else showmessage('not match');
+ end
+ else
+ begin
+ lblSize.Caption := 'No payload present';
+ lblSize.Font.Style := [fsBold];
+ PayloadPresent:=false;
+ showmessage('Datalock is in unsafe mode. Upgrade to Premium.');
+ Form1.Statuslbl.Caption:='Datalock is in unsafe mode. Upgrade to Premium.';
+// application.Terminate;
+ end;
+ finally
+ PL.Free;
+ end;
+
+end;
+
+procedure TReaderForm.FormCreate(Sender: TObject);
+begin
+ PayloadPresent:=false;
+ cReaderFile:=application.ExeName;
+// Button1Click(sender);
+// Form_crypt.KeyStr:='pRYXo6s5';
+Form_crypt.KeyStr:='pRYXo6s5';
+ Button2Click(sender);
+
+ //Form_crypt.KeyStr:=memData.Text;
+ //showmessage('chiave DataLock: '+memData.Text);
+(*
+ if memData.Text='' then begin
+ showmessage('Questa copia non è originale, impossibile da usare!');
+ application.Terminate;
+ end;
+ *)
+end;
+
+end.
diff --git a/FmWriter.frm b/FmWriter.frm
new file mode 100644
index 0000000..a547e4c
--- /dev/null
+++ b/FmWriter.frm
@@ -0,0 +1,161 @@
+object WriterForm: TWriterForm
+ Left = 387
+ Height = 519
+ Top = 242
+ Width = 652
+ BorderStyle = bsDialog
+ Caption = 'Payload Writer Demo: Writer.exe'
+ ClientHeight = 519
+ ClientWidth = 652
+ Color = clBtnFace
+ DesignTimePPI = 120
+ Font.Color = clWindowText
+ Font.Height = -14
+ Font.Name = 'MS Sans Serif'
+ OnCreate = FormCreate
+ Position = poScreenCenter
+ LCLVersion = '7.7'
+ object lblHelp: TLabel
+ Left = 0
+ Height = 81
+ Top = 0
+ Width = 652
+ Align = alTop
+ AutoSize = False
+ Caption = 'Enter some text into the control below and click the Store button to write the text as a "payload" in the Reader.exe program. Alternatively click the Delete button to remove any payload from Reader.exe.'
+ Color = clBtnHighlight
+ Font.Color = clWindowText
+ Font.Height = -16
+ Font.Name = 'MS Sans Serif'
+ ParentFont = False
+ Transparent = False
+ WordWrap = True
+ end
+ object memData: TMemo
+ Left = 0
+ Height = 50
+ Top = 240
+ Width = 444
+ Lines.Strings = (
+ 'DataLck'
+ )
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ object btnStore: TButton
+ Left = 0
+ Height = 31
+ Top = 449
+ Width = 94
+ Caption = '&Store'
+ OnClick = btnStoreClick
+ TabOrder = 1
+ end
+ object btnDelete: TButton
+ Left = 230
+ Height = 31
+ Top = 449
+ Width = 94
+ Caption = '&Delete'
+ OnClick = btnDeleteClick
+ TabOrder = 2
+ end
+ object btnClose: TButton
+ Left = 340
+ Height = 31
+ Top = 449
+ Width = 94
+ Caption = '&Close'
+ OnClick = btnCloseClick
+ TabOrder = 3
+ end
+ object Edit1: TEdit
+ Left = 0
+ Height = 24
+ Top = 90
+ Width = 300
+ TabOrder = 4
+ end
+ object Button1: TButton
+ Left = 0
+ Height = 31
+ Top = 120
+ Width = 124
+ Caption = 'Crea unique id'
+ OnClick = Button1Click
+ TabOrder = 5
+ end
+ object Edit2: TEdit
+ Left = 320
+ Height = 24
+ Top = 90
+ Width = 200
+ TabOrder = 6
+ end
+ object Button2: TButton
+ Left = 320
+ Height = 31
+ Top = 120
+ Width = 121
+ Caption = 'Preleva data ora'
+ OnClick = Button2Click
+ TabOrder = 7
+ end
+ object Edit3: TEdit
+ Left = 2
+ Height = 24
+ Top = 161
+ Width = 518
+ TabOrder = 8
+ end
+ object Edit4: TEdit
+ Left = 2
+ Height = 24
+ Top = 196
+ Width = 518
+ TabOrder = 9
+ end
+ object Button3: TButton
+ Left = 470
+ Height = 31
+ Top = 240
+ Width = 150
+ Caption = 'Match codici'
+ OnClick = Button3Click
+ TabOrder = 10
+ end
+ object Label1: TLabel
+ Left = 532
+ Height = 16
+ Top = 161
+ Width = 41
+ Caption = 'codice'
+ end
+ object Label2: TLabel
+ Left = 531
+ Height = 16
+ Top = 199
+ Width = 26
+ Caption = 'md5'
+ end
+ object memData1: TMemo
+ Left = 0
+ Height = 50
+ Top = 300
+ Width = 444
+ Lines.Strings = (
+ 'pRYXo6s5'
+ )
+ ScrollBars = ssVertical
+ TabOrder = 11
+ end
+ object btnStore1: TButton
+ Left = 110
+ Height = 31
+ Top = 450
+ Width = 94
+ Caption = '&Store con seriale'
+ OnClick = btnStore1Click
+ TabOrder = 12
+ end
+end
diff --git a/FmWriter.pas b/FmWriter.pas
new file mode 100644
index 0000000..99101af
--- /dev/null
+++ b/FmWriter.pas
@@ -0,0 +1,174 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+
+unit FmWriter;
+
+{$MODE Delphi}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, md5;
+
+type
+
+ { TWriterForm }
+
+ TWriterForm = class(TForm)
+ btnStore1: TButton;
+ Button1: TButton;
+ Button2: TButton;
+ Button3: TButton;
+ Edit1: TEdit;
+ Edit2: TEdit;
+ Edit3: TEdit;
+ Edit4: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ lblHelp: TLabel;
+ memData: TMemo;
+ btnStore: TButton;
+ btnDelete: TButton;
+ btnClose: TButton;
+ memData1: TMemo;
+ procedure btnCloseClick(Sender: TObject);
+ procedure btnDeleteClick(Sender: TObject);
+ procedure btnStore1Click(Sender: TObject);
+ procedure btnStoreClick(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ procedure Button3Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ var cReaderFile:string;
+ end;
+
+var
+ WriterForm: TWriterForm;
+
+implementation
+
+uses
+ UPayload,umain,unit_crypt;
+
+//const
+// cReaderFile = 'Reader.exe';
+
+{$R *.frm}
+
+procedure TWriterForm.btnCloseClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TWriterForm.btnDeleteClick(Sender: TObject);
+var
+ PL: TPayload;
+begin
+ PL := TPayload.Create(cReaderFile);
+ try
+ PL.RemovePayload;
+ finally
+ PL.Free;
+ end;
+end;
+
+procedure TWriterForm.btnStore1Click(Sender: TObject);
+var
+ PL: TPayload;
+ sigillo:string;
+begin
+
+ form_crypt.strsorg.Text:=form1.codiceserialepersonale;
+ Form_crypt.btnEncrypt1Click(Sender);
+
+ sigillo:=memData.Text+'-'+form_crypt.strdest.Text;
+
+ PL := TPayload.Create(cReaderFile);
+ try
+ PL.SetPayload(PChar(sigillo)^, Length(sigillo));
+ finally
+ PL.Free;
+ end;
+
+end;
+
+procedure TWriterForm.btnStoreClick(Sender: TObject);
+var
+ PL: TPayload;
+begin
+ PL := TPayload.Create(cReaderFile);
+ try
+ PL.SetPayload(PChar(memData.Text)^, Length(memData.Text));
+ finally
+ PL.Free;
+ end;
+end;
+
+procedure TWriterForm.Button1Click(Sender: TObject);
+var uid:tguid;
+begin
+ createguid(uid);
+ edit1.Caption:=guidtostring(uid);
+ edit1.Text:=stringreplace(edit1.Text,'-','',[rfReplaceAll,rfIgnoreCase]);
+ edit1.Text:=stringreplace(edit1.Text,'{','',[rfReplaceAll,rfIgnoreCase]);
+ edit1.Text:=stringreplace(edit1.Text,'}','',[rfReplaceAll,rfIgnoreCase]);
+ edit3.Caption:=edit1.Caption+edit2.Caption;
+ edit4.Text:=MD5Print(MD5String(edit3.text));
+end;
+
+procedure TWriterForm.Button2Click(Sender: TObject);
+var
+ MyTime: TDateTime;
+begin
+ MyTime:= Now;
+ //Writeln('Now it is: ' + DateTimeToStr(MyTime));
+ //Writeln('Today is: ' + FormatDateTime('yyy-mm-dd hh:nn', MyTime));
+ edit2.Caption:=FormatDateTime('mmddhhnnss', MyTime);
+
+ edit3.Caption:=edit1.Caption+edit2.Caption;
+
+ edit4.Text:=MD5Print(MD5String(edit3.text));
+end;
+
+procedure TWriterForm.Button3Click(Sender: TObject);
+begin
+ if MD5Print(MD5String(memdata.Lines[0])) = memdata.Lines[1] then showmessage('match') else showmessage('not match');
+end;
+
+procedure TWriterForm.FormCreate(Sender: TObject);
+begin
+ if not FileExists(cReaderFile) then
+ begin
+ lblHelp.Caption :=
+ 'ERROR:'#13#10'You must compile Reader.exe before using this program.';
+ lblHelp.Font.Color := clRed;
+ lblHelp.Font.Style := [fsBold];
+ btnDelete.Enabled := False;
+ btnStore.Enabled := False;
+ end;
+end;
+
+end.
diff --git a/UMain.frm b/UMain.frm
new file mode 100644
index 0000000..e2c9bda
--- /dev/null
+++ b/UMain.frm
@@ -0,0 +1,1472 @@
+object Form1: TForm1
+ Left = 387
+ Height = 674
+ Top = 213
+ Width = 810
+ AllowDropFiles = True
+ Caption = 'DataLock'
+ ClientHeight = 649
+ ClientWidth = 810
+ Color = 14079702
+ DesignTimePPI = 120
+ Font.Color = clWindowText
+ Font.Height = -15
+ Font.Name = 'Tahoma'
+ KeyPreview = True
+ Menu = MainMenu1
+ OnCloseQuery = FormCloseQuery
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnDropFiles = FormDropFiles
+ OnKeyPress = FormKeyPress
+ OnResize = FormResize
+ Position = poScreenCenter
+ LCLVersion = '7.7'
+ object Panel1: TPanel
+ Left = 0
+ Height = 45
+ Top = 604
+ Width = 810
+ Align = alBottom
+ BevelOuter = bvNone
+ ClientHeight = 45
+ ClientWidth = 810
+ Color = cl3DLight
+ ParentColor = False
+ TabOrder = 0
+ object Label1: TLabel
+ Left = 8
+ Height = 18
+ Top = 27
+ Width = 42
+ Caption = 'Pronto'
+ Visible = False
+ end
+ object Statuslbl: TLabel
+ Left = 8
+ Height = 18
+ Top = 8
+ Width = 53
+ Caption = 'Statuslbl'
+ end
+ object img_sd: TImage
+ Left = 773
+ Height = 32
+ Hint = 'DataLock Signature Status'
+ Top = 8
+ Width = 32
+ Anchors = [akTop, akRight]
+ ParentShowHint = False
+ ShowHint = True
+ end
+ object AbMeter1: TAbMeter
+ Left = 440
+ Height = 20
+ Top = 16
+ Width = 50
+ Anchors = [akTop, akRight]
+ Ctl3D = False
+ OnClick = AbMeter1Click
+ Orientation = moVertical
+ UnusedColor = cl3DLight
+ UsedColor = clNavy
+ Visible = False
+ end
+ object AbMeter2: TAbMeter
+ Left = 520
+ Height = 20
+ Top = 16
+ Width = 50
+ Anchors = [akTop, akRight]
+ Ctl3D = False
+ Orientation = moVertical
+ UnusedColor = cl3DLight
+ UsedColor = clNavy
+ Visible = False
+ end
+ end
+ object PanelFiles: TPanel
+ Left = 494
+ Height = 572
+ Top = 32
+ Width = 290
+ Align = alClient
+ BevelColor = clActiveCaption
+ BevelOuter = bvLowered
+ BorderWidth = 2
+ ClientHeight = 572
+ ClientWidth = 290
+ TabOrder = 1
+ object Panel4: TPanel
+ Left = 2
+ Height = 86
+ Top = 344
+ Width = 306
+ BevelOuter = bvNone
+ ClientHeight = 86
+ ClientWidth = 306
+ TabOrder = 0
+ Visible = False
+ object DirectoryEdit1: TDirectoryEdit
+ Left = 16
+ Height = 26
+ Top = 40
+ Width = 272
+ ShowHidden = False
+ ButtonWidth = 29
+ NumGlyphs = 1
+ Anchors = [akTop, akLeft, akRight]
+ MaxLength = 0
+ TabOrder = 0
+ Visible = False
+ OnChange = DirectoryEdit1Change
+ OnExit = Edit1Exit
+ end
+ object Label3: TLabel
+ Left = 8
+ Height = 18
+ Top = 16
+ Width = 101
+ Caption = ' Esplora cartella'
+ Visible = False
+ end
+ end
+ object FileListBox1: TFileListBox
+ Left = 2
+ Height = 136
+ Top = 434
+ Width = 294
+ Directory = 'C:\codetyphon\typhon\bin32'
+ FileType = [ftHidden, ftSystem, ftArchive, ftNormal]
+ ItemHeight = 18
+ MultiSelect = True
+ OnDblClick = FileListBox1DblClick
+ OnDragDrop = FileListBox1DragDrop
+ OnDragOver = FileListBox1DragOver
+ OnMouseDown = FileListBox1MouseDown
+ OnMouseMove = FileListBox1MouseMove
+ TabOrder = 1
+ Visible = False
+ end
+ object ListBoxtagged: TListBox
+ Left = 3
+ Height = 548
+ Top = 21
+ Width = 284
+ Align = alClient
+ BorderStyle = bsNone
+ ItemHeight = 0
+ TabOrder = 2
+ end
+ object Label2: TLabel
+ Left = 3
+ Height = 18
+ Top = 3
+ Width = 284
+ Align = alTop
+ Alignment = taCenter
+ Caption = 'Selected Files'
+ end
+ end
+ object ToolBar1: TToolBar
+ Left = 0
+ Top = 0
+ Width = 810
+ AutoSize = True
+ ButtonHeight = 32
+ ButtonWidth = 32
+ Caption = 'ToolBar1'
+ EdgeBorders = [ebLeft, ebTop, ebRight, ebBottom]
+ EdgeInner = esNone
+ EdgeOuter = esNone
+ Images = ImageList1
+ Indent = 5
+ TabOrder = 2
+ Transparent = True
+ object btnnuovo: TToolButton
+ Left = 5
+ Hint = 'New'
+ Top = 0
+ Caption = 'btnnuovo'
+ ImageIndex = 1
+ OnClick = SpeedButton16Click
+ ParentShowHint = False
+ ShowHint = True
+ end
+ object btnapri: TToolButton
+ Left = 49
+ Hint = 'Open'
+ Top = 0
+ Caption = 'btnapri'
+ ImageIndex = 2
+ OnClick = Open1Click
+ ParentShowHint = False
+ ShowHint = True
+ end
+ object btnagg: TToolButton
+ Left = 85
+ Hint = 'Add directory and files'
+ Top = 0
+ Caption = 'btnagg'
+ Enabled = False
+ ImageIndex = 0
+ OnClick = AddFiles1Click
+ ParentShowHint = False
+ ShowHint = True
+ end
+ object btndel: TToolButton
+ Left = 121
+ Hint = 'Delete'
+ Top = 0
+ Caption = 'btndel'
+ Enabled = False
+ ImageIndex = 7
+ OnClick = DeleteFiles1Click
+ ParentShowHint = False
+ ShowHint = True
+ end
+ object btnestrai: TToolButton
+ Left = 157
+ Hint = 'Extract'
+ Top = 0
+ Caption = 'btnestrai'
+ DropdownMenu = PopupExtract
+ Enabled = False
+ ImageIndex = 9
+ OnClick = Extract1Click
+ ParentShowHint = False
+ ShowHint = True
+ Style = tbsDropDown
+ end
+ object btnsalva: TToolButton
+ Left = 208
+ Hint = 'Save'
+ Top = 0
+ Caption = 'btnsalva'
+ Enabled = False
+ ImageIndex = 11
+ OnClick = Save1Click
+ ParentShowHint = False
+ ShowHint = True
+ end
+ object btnsig: TToolButton
+ Left = 244
+ Hint = 'Close and sign'
+ Top = 0
+ Caption = 'btnsig'
+ Enabled = False
+ ImageIndex = 14
+ OnClick = Close1Click
+ ParentShowHint = False
+ ShowHint = True
+ end
+ object btnchiave: TToolButton
+ Left = 280
+ Top = 0
+ Caption = 'btnchiave'
+ Visible = False
+ end
+ object ToolButton1: TToolButton
+ Left = 41
+ Height = 32
+ Top = 0
+ Caption = 'ToolButton1'
+ Style = tbsSeparator
+ end
+ end
+ object Panel5: TPanel
+ Left = 24
+ Height = 216
+ Top = 128
+ Width = 322
+ BevelOuter = bvNone
+ Caption = 'DataLock'
+ Color = 5263440
+ Font.Color = clYellow
+ Font.Height = -30
+ Font.Name = 'Tahoma'
+ ParentColor = False
+ ParentFont = False
+ TabOrder = 3
+ end
+ object PanelProgressBar: TPanel
+ Left = 784
+ Height = 572
+ Top = 32
+ Width = 26
+ Align = alRight
+ BevelOuter = bvNone
+ ClientHeight = 572
+ ClientWidth = 26
+ TabOrder = 4
+ object AbProgressBar1: TAbProgressBar
+ Left = 0
+ Height = 550
+ Top = 22
+ Width = 26
+ Align = alClient
+ Anchors = [akTop, akRight]
+ Orientation = pbTopDown
+ Step = 1
+ TabOrder = 0
+ end
+ object SpeedButton5: TSpeedButton
+ Left = 0
+ Height = 22
+ Top = 0
+ Width = 26
+ Align = alTop
+ Flat = True
+ Images = ImageList2
+ ImageIndex = 5
+ OnClick = SpeedButton5Click
+ end
+ end
+ object PanelMain: TPanel
+ Left = 0
+ Height = 572
+ Top = 32
+ Width = 488
+ Align = alLeft
+ BevelOuter = bvNone
+ BorderWidth = 2
+ ClientHeight = 572
+ ClientWidth = 488
+ TabOrder = 5
+ Visible = False
+ object AbZipOutline1: TAbZipOutline
+ Cursor = crDefault
+ Left = 2
+ Height = 484
+ Top = 2
+ Width = 440
+ Align = alClient
+ AutoSave = True
+ BorderStyle = bsNone
+ Color = clWhite
+ DeflationOption = doMaximum
+ DOSMode = False
+ DragCursor = crDrag
+ DragMode = dmManual
+ ExtractOptions = [eoCreateDirs, eoRestorePath]
+ Font.Color = clWindowText
+ Font.Height = -15
+ Font.Name = 'Tahoma'
+ Logging = False
+ OnArchiveItemProgress = AbZipOutline1ArchiveItemProgress
+ OnArchiveProgress = AbZipOutline1ArchiveProgress
+ OnChange = AbZipOutline1Change
+ OnClick = AbZipOutline1Click
+ OnConfirmProcessItem = AbZipOutline1ConfirmProcessItem
+ OnConfirmOverwrite = AbZipOutline1ConfirmOverwrite
+ OnConfirmSave = AbZipOutline1ConfirmSave
+ OnDblClick = MenuItemSelectClick
+ OnDragDrop = AbZipOutline1DragDrop
+ OnDragOver = AbZipOutline1DragOver
+ OnEndDrag = AbZipOutline1EndDrag
+ OnLoad = AbZipOutline1Load
+ OnMouseDown = AbZipOutline1MouseDown
+ OnMouseMove = AbZipOutline1MouseMove
+ OnNeedPassword = AbZipOutline1NeedPassword
+ OnSave = AbZipOutline1Save
+ OnWindowsDrop = AbZipOutline1WindowsDrop
+ ParentFont = False
+ PictureDirectory.Data = {
+ 36040000424D3604000000000000360000002800000010000000100000000100
+ 2000000000000004000064000000640000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000009090
+ 904B929292919292928F9292928F9292928F9292928F9292928F9292928F9292
+ 928F9292928F9292928F9292928F9292928F9292928B91919108000000009191
+ 919D000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000009292928B000000009292
+ 928F000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000009292928F000000009292
+ 928F000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000009292928F000000009292
+ 928F000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000009292928F000000009292
+ 928F000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000009292928F000000009292
+ 9287000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000092929290000000009292
+ 92D79292928F9292928F9292928F9292928F9292928F9292928F9292928F9292
+ 928F9292928F9292928F9292928F9292928F9292928892929286000000009292
+ 928F000000000000000000000000000000000000000095959501000000000000
+ 000000000000000000000000000000000000000000009292928B000000009292
+ 928F00000000000000000000000000000000555555008E8E8E09929292C69292
+ 928F9292928F9292928F9292928F9292928F9292928B8A8A8A07000000009191
+ 919D000000000000000000000000000000000000000091919190000000000000
+ 0000000000000000000000000000000000000000000000000000000000009191
+ 914C929292919292928F9292928F9292928F9292929091919152000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000
+ }
+ PictureDirectorySelected.Data = {
+ 36040000424D3604000000000000360000002800000010000000100000000100
+ 2000000000000004000064000000640000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000008C8C8C00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000090909046929292E5929292FF919191AC88888804919191CB9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF90909067929292FF919191D3919191D4929292FF919191A7929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF9292926B929292FF9191916A91919165919191D9929292F2929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF90909062929292FF929292FF929292FF91919194929292E0929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF9191918F919191CC929292FF929292FF929292FF90909046929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF9191918F90909061919191679090903000000000929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF929292FF9292928400000000929292709292
+ 9270929292709292927092929270929292709292927092929270929292709292
+ 9270929292709292927092929270929292709292923800000000929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF929292FF9292928800000000929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF929292FF9090904600000000929292FF9292
+ 92FF929292FF929292FF929292FF929292FF929292FF8F8F8F30000000000000
+ 0000000000000000000000000000000000000000000000000000919191CB9292
+ 92FF929292FF929292FF929292FF929292FF919191D000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000008F8F8F00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000
+ }
+ PictureFile.Data = {
+ 36040000424D3604000000000000360000002800000010000000100000000100
+ 2000000000000004000064000000640000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000008F8F8F000000000000000000000000000000
+ 0000000000009090904B9191919D9292928F9292928F9292928F9292928F9292
+ 928F9292928F9292928E919191AC000000000000000000000000000000000000
+ 0000000000009292929100000000000000000000000000000000000000000000
+ 000000000000919191009292928E000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000000000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000000000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000000000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000000000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000000000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000000000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000000000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000009191
+ 91089292928B92929290929292D5000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000009292
+ 928B00000000878787089191918C000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000000000000000000009292
+ 929000000000919191AC00000000555555000000000000000000000000000000
+ 0000000000009292928B00000000000000000000000000000000000000009292
+ 927E919191A1000000008E8E8E00000000000000000000000000000000000000
+ 000000000000898989079292928B9292928F9292928F9292928F9292928F9292
+ 928C8F8F8F109090900000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000
+ }
+ PictureFileSelected.Data = {
+ 36040000424D3604000000000000360000002800000010000000100000000100
+ 2000000000000004000064000000640000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000008F8F8F000000000000000000000000000000
+ 00000000000090909046929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF919191D5000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92F892929274929292709292927A000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 9274929292FF929292FF919191A7000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 9270929292FF919191C000000000555555000000000000000000000000000000
+ 0000000000009292927D929292FF929292FF929292FF929292FF929292FF9292
+ 926F929292EF000000008E8E8E00000000000000000000000000000000000000
+ 0000000000008F8F8F089292927D929292809292928092929280929292809292
+ 923D8F8F8F179090900000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000
+ }
+ PictureZipAttribute.Data = {
+ 36040000424D3604000000000000360000002800000010000000100000000100
+ 2000000000000004000064000000640000000000000000000000000000000000
+ 0000000000009292920000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000009191919E9292928E9292928F9292928F9292928F9292
+ 928F9292928F9292929991919146000000000000000000000000000000000000
+ 0000000000009191916F90909014000000000000000000000000000000000000
+ 00008F8F8F000000000091919199000000000000000000000000000000000000
+ 0000000000009292929000000000000000000000000000000000000000000000
+ 0000000000008F8F8F009292928F000000000000000000000000000000000000
+ 0000000000009292928F000000000000000000000000909090329292927D0000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F000000000000000000000000919191A07C7C7C099292
+ 927D00000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F000000000000000000000000919191979191919C9090
+ 903200000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000008C8C8C0092929239929292789B9B
+ 9B0100000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000092929238929292CF0000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000092929238929292CF0000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000092929238929292CF0000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009292928F00000000000000000000000092929238929292CF0000
+ 000000000000000000009292928F000000000000000000000000000000000000
+ 0000000000009191918A00000000000000000000000092929238929292CF0000
+ 000000000000000000009191918E000000000000000000000000000000000000
+ 0000000000009292922991919186000000000000000092929227929292D10000
+ 000000000000909090149191919E000000000000000000000000000000000000
+ 00000000000000000000929292299292928A9292928F92929287929292879292
+ 928F929292909292926F00000000929292000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000
+ }
+ PictureZipAttributeSelected.Data = {
+ 36040000424D3604000000000000360000002800000010000000100000000100
+ 2000000000000004000064000000640000000000000000000000000000000000
+ 0000000000009292920000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000929292B7929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292F391919140000000000000000000000000000000000000
+ 00000000000091919163929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292F3000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292FF929292FF9292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292CD919191829292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF9090905F929292F79191
+ 9182929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF91919168919191639292
+ 92CD929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292C6929292879292
+ 92FE929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292C7929292309292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292C7929292309292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292C7929292309292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929280929292FF929292FF929292FF929292C7929292309292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 0000000000009191917B929292FF929292FF929292FF929292C7929292309292
+ 92FF929292FF929292FF929292FF000000000000000000000000000000000000
+ 00000000000092929225929292FF929292FF929292FF929292C7929292309292
+ 92FF929292FF929292FF929292B7000000000000000000000000000000000000
+ 00000000000000000000929292259292927A9292928092929290000000009292
+ 9288929292809292926300000000929292000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000
+ }
+ PopupMenu = PopupMenu1
+ StoreOptions = [soStripDrive, soRemoveDots, soReplace]
+ TabOrder = 0
+ TabStop = True
+ end
+ object PanelLog: TPanel
+ Left = 2
+ Height = 84
+ Top = 486
+ Width = 484
+ Align = alBottom
+ BevelOuter = bvNone
+ Caption = 'PanelLog'
+ ClientHeight = 84
+ ClientWidth = 484
+ TabOrder = 1
+ Visible = False
+ object Memo1: TMemo
+ Left = 0
+ Height = 84
+ Top = 0
+ Width = 484
+ Align = alClient
+ BorderStyle = bsNone
+ Lines.Strings = (
+ 'Log'
+ )
+ TabOrder = 0
+ end
+ end
+ object PanelMoveFiles: TPanel
+ Left = 442
+ Height = 484
+ Top = 2
+ Width = 44
+ Align = alRight
+ BevelOuter = bvNone
+ ClientHeight = 484
+ ClientWidth = 44
+ DoubleBuffered = True
+ ParentDoubleBuffered = False
+ TabOrder = 2
+ Visible = False
+ object SpeedButton1: TSpeedButton
+ Left = 8
+ Height = 28
+ Hint = 'Select file'
+ Top = 24
+ Width = 29
+ Flat = True
+ Images = ImageList2
+ ImageIndex = 0
+ OnClick = MenuItemSelectClick
+ ShowHint = True
+ ParentShowHint = False
+ end
+ object MenuFileDeselect: TSpeedButton
+ Left = 8
+ Height = 28
+ Hint = 'Deselect file'
+ Top = 64
+ Width = 29
+ Flat = True
+ Images = ImageList2
+ ImageIndex = 1
+ OnClick = MenuFileDeselectClick
+ ShowHint = True
+ ParentShowHint = False
+ end
+ object ExtractAllSelected: TSpeedButton
+ Left = 8
+ Height = 28
+ Hint = 'Extract selected files'
+ Top = 160
+ Width = 29
+ Flat = True
+ Images = ImageList2
+ ImageIndex = 2
+ OnClick = ExtractAllSelectedClick
+ ShowHint = True
+ ParentShowHint = False
+ end
+ object DeleteAllSelected: TSpeedButton
+ Left = 8
+ Height = 28
+ Hint = 'Delete selected files'
+ Top = 200
+ Width = 29
+ Flat = True
+ Images = ImageList2
+ ImageIndex = 3
+ OnClick = DeleteAllSelectedClick
+ ShowHint = True
+ ParentShowHint = False
+ end
+ object MenuFileDeselectAll: TSpeedButton
+ Left = 8
+ Height = 28
+ Hint = 'Deselect all selected files'
+ Top = 104
+ Width = 29
+ Flat = True
+ Images = ImageList2
+ ImageIndex = 4
+ OnClick = MenuFileDeselectAllClick
+ ShowHint = True
+ ParentShowHint = False
+ end
+ end
+ end
+ object Splitter1: TSplitter
+ Left = 488
+ Height = 572
+ Top = 32
+ Width = 6
+ end
+ object MainMenu1: TMainMenu
+ Left = 240
+ Top = 110
+ object File1: TMenuItem
+ Caption = '&File'
+ object MenuItem2: TMenuItem
+ Caption = 'Crypt'
+ Visible = False
+ OnClick = MenuItem2Click
+ end
+ object MenuItem1: TMenuItem
+ Caption = '&New'
+ OnClick = MenuItem1Click
+ end
+ object Open1: TMenuItem
+ Caption = '&Open'
+ ShortCut = 16463
+ OnClick = Open1Click
+ end
+ object Save1: TMenuItem
+ Caption = '&Save'
+ ShortCut = 16467
+ OnClick = Save1Click
+ end
+ object Close1: TMenuItem
+ Caption = '&Close and Sign'
+ OnClick = Close1Click
+ end
+ object N4: TMenuItem
+ Caption = '-'
+ end
+ object Convert1: TMenuItem
+ Caption = '&Convert (to .exe)'
+ Visible = False
+ OnClick = Convert1Click
+ end
+ object N1: TMenuItem
+ Caption = '-'
+ Visible = False
+ end
+ object Exit1: TMenuItem
+ Caption = 'E&xit'
+ OnClick = Exit1Click
+ end
+ end
+ object Preferences1: TMenuItem
+ Caption = '&Preferences'
+ Visible = False
+ object Confirmations1: TMenuItem
+ Caption = 'Con&firmations'
+ OnClick = Confirmations1Click
+ end
+ object CompressionMethodToUse1: TMenuItem
+ Caption = '&Compression Method To Use'
+ object Store1: TMenuItem
+ Caption = '&Store'
+ GroupIndex = 12
+ OnClick = Best1Click
+ end
+ object Deflate1: TMenuItem
+ Tag = 1
+ Caption = '&Deflate'
+ GroupIndex = 12
+ OnClick = Best1Click
+ end
+ object Best1: TMenuItem
+ Tag = 2
+ Caption = '&Best'
+ GroupIndex = 12
+ OnClick = Best1Click
+ end
+ end
+ object DeflationOption1: TMenuItem
+ Caption = '&Deflation Options'
+ object Normal1: TMenuItem
+ Tag = 1
+ Caption = '&Normal'
+ GroupIndex = 15
+ OnClick = SuperFast1Click
+ end
+ object Maximum1: TMenuItem
+ Tag = 2
+ Caption = 'Ma&ximum'
+ GroupIndex = 15
+ OnClick = SuperFast1Click
+ end
+ object Fast1: TMenuItem
+ Tag = 3
+ Caption = '&Fast'
+ GroupIndex = 15
+ OnClick = SuperFast1Click
+ end
+ object SuperFast1: TMenuItem
+ Tag = 4
+ Caption = '&Super Fast'
+ GroupIndex = 15
+ OnClick = SuperFast1Click
+ end
+ end
+ object ExtractOptions1: TMenuItem
+ Caption = '&Extract Options'
+ object CreateDirs1: TMenuItem
+ Caption = '&Create Directories'
+ OnClick = CreateDirs1Click
+ end
+ object RestorePath1: TMenuItem
+ Caption = '&Restore Path'
+ OnClick = RestorePath1Click
+ end
+ end
+ object Logging1: TMenuItem
+ Caption = '&Logging...'
+ OnClick = Logging1Click
+ end
+ object Password1: TMenuItem
+ Caption = '&Password...'
+ OnClick = Password1Click
+ end
+ object StoreOptions1: TMenuItem
+ Caption = '&Store Options'
+ object RecurseTree1: TMenuItem
+ Tag = 3
+ Caption = '&Recurse Tree'
+ OnClick = StripPath1Click
+ end
+ object RemoveDots1: TMenuItem
+ Tag = 2
+ Caption = 'Remove &Dots'
+ OnClick = StripPath1Click
+ end
+ object StripPath1: TMenuItem
+ Tag = 1
+ Caption = '&Strip Path'
+ OnClick = StripPath1Click
+ end
+ end
+ object ShowEmptyfolders1: TMenuItem
+ Caption = 'S&how Empty folders'
+ end
+ object TempDirectory1: TMenuItem
+ Caption = '&Temp Directory...'
+ OnClick = TempDirectory1Click
+ end
+ end
+ object View1: TMenuItem
+ Caption = '&View'
+ object Attributes1: TMenuItem
+ Caption = '&Attributes'
+ object za0: TMenuItem
+ Caption = '&Compressed Size'
+ OnClick = za10Click
+ end
+ object za1: TMenuItem
+ Tag = 1
+ Caption = 'Compression &Method'
+ OnClick = za10Click
+ end
+ object za2: TMenuItem
+ Tag = 2
+ Caption = 'Compression R&atio'
+ OnClick = za10Click
+ end
+ object za3: TMenuItem
+ Tag = 3
+ Caption = 'C&RC'
+ OnClick = za10Click
+ end
+ object za4: TMenuItem
+ Tag = 4
+ Caption = '&External File Attributes'
+ OnClick = za10Click
+ end
+ object za5: TMenuItem
+ Tag = 5
+ Caption = '&Internal File Attributes'
+ OnClick = za10Click
+ end
+ object za6: TMenuItem
+ Tag = 6
+ Caption = 'E&ncryption'
+ OnClick = za10Click
+ end
+ object za7: TMenuItem
+ Tag = 7
+ Caption = '&Time Stamp'
+ OnClick = za10Click
+ end
+ object za8: TMenuItem
+ Tag = 8
+ Caption = '&Uncompressed Size'
+ OnClick = za10Click
+ end
+ object za9: TMenuItem
+ Tag = 9
+ Caption = '&Version Made By'
+ OnClick = za10Click
+ end
+ object za10: TMenuItem
+ Tag = 10
+ Caption = 'Version Nee&ded To Extract'
+ OnClick = za10Click
+ end
+ object FileComment1: TMenuItem
+ Tag = 11
+ Caption = '&File Comment'
+ OnClick = za10Click
+ end
+ object N3: TMenuItem
+ Caption = '-'
+ end
+ object None1: TMenuItem
+ Caption = 'N&one'
+ OnClick = None1Click
+ end
+ object All1: TMenuItem
+ Caption = 'A&ll'
+ OnClick = All1Click
+ end
+ object Default1: TMenuItem
+ Caption = 'Defa&ult'
+ OnClick = Default1Click
+ end
+ end
+ object Font1: TMenuItem
+ Caption = '&Font...'
+ OnClick = Font1Click
+ end
+ object Style1: TMenuItem
+ Caption = '&Style'
+ object Hierarchy1: TMenuItem
+ Caption = '&Hierarchy'
+ OnClick = Hierarchy1Click
+ end
+ object N5: TMenuItem
+ Caption = '-'
+ end
+ object OS1: TMenuItem
+ Caption = '&Only Text'
+ OnClick = OS5Click
+ end
+ object OS2: TMenuItem
+ Tag = 1
+ Caption = '+/&-'
+ OnClick = OS5Click
+ end
+ object OS3: TMenuItem
+ Tag = 2
+ Caption = '&Glyphs'
+ OnClick = OS5Click
+ end
+ object OS4: TMenuItem
+ Tag = 3
+ Caption = '&+/- and Glyphs'
+ OnClick = OS5Click
+ end
+ object OS5: TMenuItem
+ Tag = 4
+ Caption = 'Only T&ree'
+ OnClick = OS5Click
+ end
+ object OS6: TMenuItem
+ Tag = 5
+ Caption = '&Tree and Glyphs'
+ OnClick = OS5Click
+ end
+ end
+ end
+ object Items1: TMenuItem
+ Caption = '&Items'
+ Visible = False
+ object AddFiles1: TMenuItem
+ Caption = '&Add Files...'
+ OnClick = AddFiles1Click
+ end
+ object DeleteFiles1: TMenuItem
+ Caption = '&Delete Files...'
+ OnClick = DeleteFiles1Click
+ end
+ object ExtractFiles1: TMenuItem
+ Caption = '&Extract Files...'
+ OnClick = ExtractFiles1Click
+ end
+ object FreshenFiles1: TMenuItem
+ Caption = '&Freshen Files...'
+ OnClick = FreshenFiles1Click
+ end
+ end
+ object Help1: TMenuItem
+ Caption = '&?'
+ object Contents1: TMenuItem
+ Caption = '&Guide'
+ ShortCut = 112
+ OnClick = Contents1Click
+ end
+ object N2: TMenuItem
+ Caption = '-'
+ end
+ object AbbreviaontheWeb1: TMenuItem
+ Caption = 'DataLock on the web'
+ end
+ object About1: TMenuItem
+ Caption = 'DataLock Info'
+ OnClick = About1Click
+ end
+ end
+ end
+ object FontDialog1: TFontDialog
+ MinFontSize = 0
+ MaxFontSize = 0
+ Options = [fdEffects, fdForceFontExist]
+ Left = 320
+ Top = 170
+ end
+ object OpenDialog1: TOpenDialog
+ Title = 'Open DataLock Folder'
+ DefaultExt = '.ldk'
+ Filter = 'DataLock|*.ldk|Zip|*.zip'
+ Options = [ofExtensionDifferent, ofForceShowHidden]
+ Left = 280
+ Top = 300
+ end
+ object PopupMenu1: TPopupMenu
+ AutoPopup = False
+ Left = 180
+ Top = 250
+ object MenuItemSelect: TMenuItem
+ Caption = 'Select File'
+ OnClick = MenuItemSelectClick
+ end
+ object MenuItem7: TMenuItem
+ Caption = 'Deselect File'
+ OnClick = MenuItem7Click
+ end
+ object Separator1: TMenuItem
+ Caption = '-'
+ end
+ object Delete1: TMenuItem
+ Caption = 'Delete Selected File(s)'
+ OnClick = Delete1Click
+ end
+ object MenuItem5: TMenuItem
+ Caption = 'Delete Files'
+ OnClick = DeleteFiles1Click
+ end
+ object Extract1: TMenuItem
+ Caption = 'Estract Selected File(s)'
+ OnClick = Extract1Click
+ end
+ object MenuItem6: TMenuItem
+ Caption = 'Extract All'
+ OnClick = ExtractFiles1Click
+ end
+ object Freshen1: TMenuItem
+ Caption = '&Freshen'
+ Visible = False
+ OnClick = Freshen1Click
+ end
+ object Move1: TMenuItem
+ Caption = '&Move...'
+ Visible = False
+ OnClick = Move1Click
+ end
+ object Run1: TMenuItem
+ Caption = '&Run'
+ Visible = False
+ OnClick = AbZipOutline1DblClick
+ end
+ end
+ object SaveDialog1: TSaveDialog
+ Title = 'Save DataLock Folder'
+ DefaultExt = '.ldk'
+ Filter = 'DataLock|*.ldk'
+ Left = 280
+ Top = 380
+ end
+ object OgProtectExe1: TOgProtectExe
+ AutoCheck = False
+ CheckSize = False
+ OnChecked = OgProtectExe1Checked
+ Left = 730
+ Top = 160
+ end
+ object OgDaysCode1: TOgDaysCode
+ AutoCheck = False
+ OnChecked = OgDaysCode1Checked
+ OnGetKey = OgDaysCode1GetKey
+ OnGetCode = OgDaysCode1GetCode
+ AutoDecrease = False
+ OnChangeCode = OgDaysCode1ChangeCode
+ Left = 730
+ Top = 243
+ end
+ object ImageList1: TImageList
+ Height = 32
+ Width = 32
+ Left = 730
+ Top = 310
+ Bitmap = {
+ 4C7A1000000020000000200000000D2600000000000078DAED9D07545CD995AE
+ DB1ECF38BCF5ECB6676CAFF77ADEB8BBED6E77DB33B6673CE3D0AD5642899CB3
+ 080244103967A8222321B2048820048216390A9191C8482089A4D448A056A05B
+ 220A0524C27E675FA8A27251D4AD72CFAC62ADBD2ADD7BBE73CFBDB7A87DF6BF
+ F70180B74080C5C7BB7FBF2AD9DBAAE954504D471E73A2B72062EA6A51D4F3E1
+ F2A36FEED41E5F1D6F48843BB5F1AB231547DF0C1447BDE8239F77E631EF3765
+ 065DA84CF6B5CB3BE6F5BF4048DBC2EC34C3F27BF51981397D8511336375F170
+ BF3169CB7697EC7FB93062B63123302F2383F103916C06E3DB35A97E99782CD2
+ 3085D968E5D1A5DA14BFFC627DFDBF13C4276356280B2EAF11CE795E7676B8D5
+ AF6F93F3290F3E9ED3D3810E7FE1E41706BB1B0C1446813CF8D78B62A020C4C5
+ 95937F36C4D5B0393E985C2F093265DFBB90084D8453C87073E3E55F498B828E
+ 6426B49E0C81F1FA445AB913E43E6D4B0B8576D23E7284F159762989018D8941
+ D091C9805BD5C7B7C4BC4DF6EBC86652ED607B9CED8BE3F35A5B622834C60751
+ 6D35250741CB8960B898114AB57F893CE26B7CBF817CDE981004AD09A1705944
+ 7B92F2E9365E7E7E88B3A93CF9F9C12E5E9C7CE62163E3FA63817261371F0F06
+ A68DB127273FF090BE618C9D29B9FEC364CAEE4E0987A30E661068A9E7C6CB67
+ 58EA43B895219CF677824E9AFBD195120667029C21DCDA0890238CCFB230D28F
+ 340F5B3817EA068DC782E0F2C9488978B87D535C10D9DF1DD23D6D09D71038DB
+ 17C7E735EC4FBC9325A4B85A93F6EC20DBF708E4053A4361882BF588AFF1FD54
+ 371B6A3B5E1EAF49CAA7DB78F93E263A66743398478C202CDC02C2D36C2022CF
+ 1EC213AD212CC80C185606E07750D79B937F48679FA19F990E6DECB0184B886A
+ 7583A80E773E8BA87602175FDDE3BC7C4395CF20C8424F6A7644B6AD402E97B5
+ BBAF4477B86B73F235F7FE05D06C75F76FB91F614C733E56725F28F43E6CE37B
+ 3FB2C3FDE9B12EAF9FF1F25966A6BE0B1C0D54C0F7A036846CA63FD60610D5EC
+ CAC7393B74029EBF79266C2CB284F1794DEFC0A760A2BA132C3495C046671F38
+ E8298393812A38E82B53AFEDEDD4043244F3DDC636CB1767877D35D9ED9EBC12
+ 0E4D772B28EB7FDC01AF9717D9AF2F7C5102319D9EAC6D57639A7C7F64A1B577
+ 9FB47CFB501D36BF64340BEECEDCA4ECF1C27D585E5D66BFBE33350C497D211B
+ F7C3258FFF876360A2BE6B541ABE99EDFE2D8CBFFB13D63D60BD7FFF4F8C54B7
+ 3FDA2A5F477D1B44B6BB49C66F77E7F3052CB5F7EA1BA9EE78B8953E38C518F0
+ 3132078EC2E4C20341FCE5E82ED7FF12E68FD9A8EF7BCF5C4B29989C970E4395
+ ED33DAFBFEBA2A8EAF75E0AF10546AC7C78AEDF4E2E777BA474AEA9B5AEEDCF9
+ 3D736D950F2DB595F65A68EE3964A1BDC7CB527B8F155EBF96BAFB3EC2CFA3DA
+ 9D7F4ABE5BCA457CFF2D46B5BBF914170BF603E9B2E80E0F7DC2CA23364A6C9E
+ 5827B1A4D84B6E1F4BD20EF9FB16F1C90F9444D9E75E8877196D4A767B7C29CD
+ 73AE27CBE7D5D53CFFE51BE782010D9FE37BF8196E83DBE23EB82FB62109B38D
+ C1F84E598C4372538AEBE4607EC0CA9D925090C6B00D6C0BDBC4B68571190CC6
+ B70B9887E3FBB27D16A5650A336C1B19C8E2E6BFF5AD8B699EC3B2E2F21AB290
+ C9E2571D3DE2232F36CB90C9E29F63D836C89B8F4CF6BC93BB5573E7492FB9B1
+ 91854C36DFCDEA623DF9BD5F19E648EEA7109971B16D64200B999CFCB6704F40
+ 3B1FE20235114E703D2F80362EB6856D62DB2C8E303EA755073941599003D4C5
+ 38435FA60F0C9F0D12CBC26D705BDC07F7C53604B5BD19BE206B0DF320E3E70A
+ B5C1CE5019E848193EC7F7F0B3CDB6B3553E5DC6C9CF723ED42A6F3E32597C6F
+ 238D9ACA0047B9B191854C36DF58E36224F173AB029D64CE4606B290C9C967F9
+ 12F176A6502183B1C036B16D1647189F653136C69072C40CF23C0EC3F9601789
+ 79B80FEE8B6D605BBCED8BE3F35AF8210388B63682A3878DA9E348B23783138E
+ E694E1737C0F3FC36D705B71ED49CAA7DBBE49FCC31AFB2A4368F0FF376BC842
+ 26FBB7B5CAEE8B47B40F40A81CD8C840163239F9C4C0467D0F781AAA43A8850C
+ B8A44D6C1B19C812C467998DDA1E70D153051F634D0836D7DD3213F7C536B02D
+ 6C9393218ACF6B36EA7BC1514799B4A3026EFA6AE0418E837C7F82AF891665F8
+ 1CDFC3CF701BDC16F711D5A6247C19D937867F4845C94EDE7C6472F9B7CABBDA
+ E4C6272C01FED7772C5576A592CF1765C85E440643B41FF81D0B95DDF164DBAF
+ C8E3AAB4CCF536B0AD78515CA1F30E2A4A070EA9ECCE216D8C129B243647EC15
+ B1650ECEF2FA7B73EBDB8CAEEDA37460AB730867939D7F589BECEBD092197CBE
+ 2B8F39DE5718FEF46A71B4C0F8FF35F2FEE5C288A75DF96113ADD9C14DD5297E
+ EE35719EFF2429B33CCAFF1F09AFFA4A51E4B37B17A48BC7621C75A028EA7953
+ 667073717CE03BA2B8190CDB1F9C4FF52BBD59756C4516B15F8CAFD7A7075E28
+ 8EB7FE091FBF8DF19DFE73911372897F97C53C7D5C93C1A585A84BF3F791079B
+ AD41381598C2C9AF88F33C2D4F7E4D826F3D27BF38CCA3A02D3D442EECCE6C26
+ 944578B772F24B989E8518B7C318F7C0E7B2D1415C2F8EA1DA474E79B8F74541
+ 7C2A76B8DE8FB674E247971E958A395276948ACF372470C73045F1790D350BD8
+ 9FA6E4604A1BD17E8A013DB9E1649CA2A9F6AF9E8B86DE33E1D09EB9A69D684E
+ 098686787ECD01A749C297857DD3F8A9EE361992C698A5B1342FBB4A4E7E90B9
+ 7E416E80935CD867835D21D0429FEBFE0BB4D02BC4DFCA27DD0F43535CB04CB8
+ ADF12190E169074CC209B2D4BF2888CFB213EE365011E10D97121952313B9298
+ 5019E9436900981CFEB0383EA745DB9A50E3921FE402450C77AA5FB5317ED018
+ 47BE231242299DC1F9187FEAFD228607B51D6A176238E619784D12BE2CEC9BC6
+ 7733D2C8A0A3DD2C2F6DB892AA22D6AEA629CF7D71E6C0F53553D633D3DC5DE0
+ 6EA229353FDF4F0BC6720F4864774FEFB73FA8B1BB908A21EBEC974A83209CAF
+ 0C636794C5F2D9B16CD20F9F83DA102C615F04F3956161FC12BC78D027B00F82
+ F89C66A0BC8DD244B81B6B8097A916A547F037D38140E2D763FFF03180BCC6F7
+ 33BDD5F9D8F3B76A61E5CD4B622FE0D958335F1FC4F125B108BBED7CECA5174F
+ 09B71116EEB6C09B6793E47913571F64C59F1D29A5D8F7CBAC60EE4605CCDF3E
+ 0F1325E6F0666112E66E5673F151FFA0B5F7AFB4F21FD4BA526C7CCEE2E3F389
+ 52737858E7C1C5C7EF00538DDD35F48EFF8671F2055D7FACEF218CB7EBAB7CF6
+ EC6FC5679985E61E7763B59D37F494B72DFE2DF89C66ADB3FB176B3A84DD8D26
+ 6ABB068C54778E19AAEEF80AC7495F79DB2B7C3452D9FEB5B1DA8EBBC9EE7B26
+ E8E64B6263A70F58D2C9AF7376FE6E65B2B739F1D72A3BCF30C77B0BC2A70628
+ FD7FEC9BDBEBFEFF17E7E357872B6297AE9644BDE82B0C9FEECC637ED99C19DC
+ 5899E4ED581CE3FB23498F01E3F3F5E901A9986B305697209526FDEE8504B8FC
+ 79C47CE3A9A092E20C5BB17DA94AF649192C8B792D0BFFEB6655DC72DDC980E2
+ BABAE4EF0A625F480FC89087FFD996137291979DC7B0FD979BD57172D1FFE339
+ 391BE2A8C4C93F13E2A6DC97172117FF1B7DDA02867B00D7F107B9A8B42484E0
+ B52C5336CE47A12F4BF841BC7CFCBDDE991206CDA9F4E7214C3424517A79964F
+ 2C8CCFF61B92D774FBE86B93EB764BCC3B35F1D0951D46B583FA7DCEF6C5F145
+ E9FF1B93D6F5FFE99CFAFF104AFF8F9FA3EFDF4ACEA5287F56523EDDC6CBCF0D
+ 72D2902B3FC42D94931F60ADAF7A2136402E6CF4839936465C7C7F4B5D95685B
+ 53684F62CA56FF9F1A0E71472CC0DF422F8897CFD2FFE7F839D2DE0FE4E60739
+ 4384CD9AFE5F189FAD1DB732A07CEECF43DCA0E15820F449AAFF2786F318E8AF
+ E39C43C47ADE01CBC4F105EBFF2DD6F5FFB66BFAFF8035FD7F7EA00B97FE3FC1
+ 59BCFE5F52BEC47E70B013B4E4C6C0ADA6D370BB25175A73632127D44528DFCB
+ 54539B0E6E94AD09741725C0F46025F9BDD50C2F263A295B18BB04B3C3D5D057
+ 9A0CD17626E06DA6CBE48AEF68EE5541FF4D5AFEE0F90C9819A985C547FDF0FA
+ ABEB94BD99BE0D2B2F9FC0D2B387307FA7056E369F060BDDFD21BC7C7DE5CF20
+ 488A3873719C1F39EE2A589CBCCAC766D9F2C263981EAA86BADCE83A5EFE86EF
+ BD6F4BFDB87B299F1A6B61EC95175FC39BA737E0C5FD2E78DC5F3A2B8CCFB283
+ EA3B39F4FF62F20EC8FD81E7FCD5A32B22D9F8199E9BD9E1AAD5C7FD353F10C5
+ 17340F807DB2D454A2C60875FFA8FF3F421E3D2DB4B04D6AEC45B1299BBC466D
+ 3B3758FD9E247C71F6F84A09E15F17CD26F6EAE1659819AC5C02D8D0BF1ED2DC
+ F789B4FCCEF26478F1E5656EF6D44D2E36DAB3B13618EF2CB8C7FB1BD8446DE7
+ 3569F80E07D5C8B55D096F66EE0A65E3B1E375323B5AF5EFBC7C53D33FFFD048
+ 6DC77D69FA7022DC1966C8B97D71BF9B8FFD7CBC03A608FBC9D5B27E91B166CD
+ 7DEA46AA3BC6B7DA073F074398E82EA48EF3EBEB55F0847C27AC71CBE7C877A0
+ 33B9F61ECF0E55C78BF3C5CCF5D5DEB1D052F23FA8BEEBA281CAF6E9CDE8FFD1
+ 703B23F51D7381474C06CBD219B5A3CD39CCD9A1AAEDD09FF1F7D8EED470F9C7
+ A40F5FCF0D574AACFFD7D7D7FF074BDDBD1F5868ED5532D756B240FDBFB9CE6E
+ 1B96FEDF565DFD079B69879CA3DF91B1989E1DA90A92650E80289B1BAEFA4F32
+ 0EF7446DA3F0FF15FEBFC2FF57F8FF0AFF5FE1FFCBC3FFEF9087FFEFA8F0FFFF
+ A7FBFFE28C97EF79504B4B9E7C1F733D862CFCFF4DD53E20BEB5B9CEDE60BAFD
+ FF4D69D12DF4C0546D279869ED09A2DBFFE7ABBF70C8004AE3FDE17269127CD1
+ 920DAD05B1E06EADBD96AB2D82CF32D375FF7F2B3A80301B6318A84C81AFFAF2
+ E05143303CA87682C72D113075BD0C32A25C37C5E7CBFFDF2F3AFF1FE7051283
+ 1DE0DAF913F0E45A294CF6E4C0DDB3DC7A8489120BAA0F290CA70C49F9E22CC8
+ D9049E0C14C1C3F39E70BFCC06EE15EA098C373E6A0E8781DAB401AEFA1352FA
+ FF76262AF0A8EF73C2F610AB37F9B2D281F8A225AFE6066BFE830EFFDF446327
+ 7CD953000F1B43D77426E2F42EF99AF0B899B93C3B54FE9AF8A086D2FAFF91DE
+ 87E0515796C4BA9B07356E307DBDF496B4FE7FEE716F78D8765C62FEBD026D6A
+ 1E6AE16ADD4FA5F1FFC33DC9357DAD8C1A57498F9FF09F73CE436DC5FFB7D2DF
+ 67FBF8F2B9F1277DA75F3DA87686F1734662CC181E5DF05D9DB95EF2922EFF7F
+ 6EA8F6C7E458B26686CAA7714CC5D9CC60F9F8EC48A5BBB86357E8FF15FA7F85
+ FE5FA1FF57E8FF15FA7F85FE5FA1FFDF8CFEBF34DA0FF2999E70D2F7082490E3
+ 106489DE0EBDAF26AFBDFBF2E1E03FD3A9BF4FF6B283C5C7D7F8625F226CE5F5
+ E4F5DFD2A9FFC71A8F478F98C1974D2922EDF1D5825FC0E8E83FD0A9FFDFE883
+ A1C81AB2138D49ABB7AA62FF37EBFCD3A5FFE7B4AE5C86507EF7D9B019CEEB8F
+ 2EFD3FA715863B0BE56787397C21882FADFE9FEBBEB13386A1D2183EF6D5E248
+ 703451ED16C5DFAAFE1F3FC7EDECF50E8091EA763054FD0C6A4FFAB0D91732FC
+ C0587D3BA04FB559BEB4A677E013A84AF1829A13DEA0AFB26D5D5B211FBEA5CE
+ 6EE8C80BE5B8EE1860A5B7878F4F97FE9FD3CCB57761CD6FFE3860F5310839C2
+ 3DFF4D97FE9FD3E27DCD45FD36F311E8734BA9FFE7B496EC4051DF3FBDA27CB1
+ ADEAFF59A6AFF229A06F2AE2F857C7DB12DEDE8C3F2A89FEDF587DE7555F07D3
+ AE8410A7DC47973241943DBBDBB46DF1C9C0AFE88CE92F3EB9F601F99FB624C1
+ FFBF65FCFFA788FF2BE2FF8AF8BF22FEAF88FF2BE2FF8AF8BF22FEAF88FFD310
+ EBB6B2056FDB38703D520C4E8E0DE06E9F03BE874321D4D248C6F17F03F0B44B
+ 032BB74938E43ECD67B6CED7C0E2A05F8AACE2FF8E8ECD02B99C66E5FE74C9CA
+ 7D6A0FDDF17F2FDB04B16C0EFBD2D479FA8774C5FF430F1D046BB787ECF6330B
+ 9EC39992E7ECD74E8133D0DDFF1A5C836739FB10475BFCDFD091EBF8C212E6E1
+ E5AB5528AC7841B1EF3F5C86E19B6FE0B017D7185CA32BFE6F6814C537C69149
+ F3F06A7115A6675728B6ADF70CEF364BFAEE0FBE4F87FEDFC834898F8FC7FD70
+ 7219F0AFA4E685E0FBC1F3D93FD1A1FFD7D371E663E3985F1B790DD1296BE7A2
+ A89AAF0FE374E9FFB5950F90F6A6D86DD734BDA4D8ACF31D9EB8D6070F26C7F5
+ E7315D48A7FEDFD8FCF4C6B892736DE5C13DD676BE9CE77F6AD1C66DEA633AF5
+ FF5AFB778085E3C8A6EE7F2BF7196F59E8FFCDDDA7DE21EDD78960BF20C7EEF4
+ D65BF02D59EAFB2DDD674C2C3DA6CE12DE4D6273C4DA2DDDA6132C5D9E7CB0D9
+ 3614EBFF29D6FF53ACFFA758FF4FB1FE9F62FD3FC5FA7F8AF5FF14EBFF49A0F1
+ B73D0CE6DE71A0CA2C855D312DA0137C060EBB8741C8216399AFFF67E2970A1F
+ 643C85F7B29EF1D91F926E828A6398CCD6FFDB1B592790CB6599F32BBFC87E46
+ FBFA7F965EB1E2D91BF6F497690BB4ADFF176C650C1FA53F96844FC6E1196DEB
+ FFE95AD849C626F66ED633DAD6FFFBCC3E8CDDEEF6A2E710DEB328D0823A5FC1
+ AF72D87D587D3F638696F5FF3E713ECEE6DB34BE844B0F96045AE3C412FCA960
+ 81BDED2F735ED2B2FE9FD2410789C79F186DEBFFA9A9EC81F733E7243DFFB4AE
+ FFF767CF5392F097DF3F354FEBFA7F1AFBB7C16FE206377BEFC964FDBF5FE52C
+ FCF4FDCC67E522D88B64DC7DDE2A0699AEFFF75ED6823E61E5BD9FF56C943CCE
+ 13EB7C2F7B21E917990B9B5EFF4F11FF57C4FF15F17F45FC5F11FF57C4FF15F1
+ 7F45FC5F11FFFFEF95FFEFEB60051FD5DD067366CCDF24FF7F574E2DFCDFCE59
+ F855D37D083C6C26D7FC7F472F2FC29EA1F8683B92F2408BE5DBCB38FF3FC4C2
+ 007E57D64F717DC75EC2BFF5CDC13B979EC201439D4DF3B792FF8F63AB77601B
+ 7CEA15C83EEEB1972B603AFA9C7AFE9B9CFA35BEF69E40BAF3FFD97EA8EA2EF8
+ 45FD5D817CB49D0E4E7CC74F47FC9F657F8C3DC56609E2BF5F350CA67AAA6E74
+ D7FF43DB6FA84B9D67517CB477BA663D6451FFEFE3D38D5C1CB4F227AF61C7C0
+ 33DEF7E77FDEB536F74557FC7FC711173EB618CBA2ABFE9F06B9E6DFAF1E11C8
+ 497DB0089F0ECC0BFA6CE5FF74CCFD918EF8FF6FCF7567093BCE6D84FD2F5D42
+ C6A063B68B0E5F1FC752C2B167D9D7EFB68D7F4F58BBC5F1EEEFD4A4FA06B564
+ 057777E5873DBCF279C4CCB592E89718CB46DF1CFD99DBD5712B43C467EE2F8E
+ 7AD65310FEA43D97719BF8B2F9A5C7BD55DE7AEB2D89350EA549DE1FB466855C
+ BA5A1CFD72A241BA38E82DD2B76ED2EFF3A9FE1EE2B8581FA02933A853DA3907
+ 6176E5F3C8B9F2046F4761FCBEC2F04959FBBEE80756257AEBF3B24B8E7B84C9
+ 2BF7BEA7206C818F1FE95D25EBD83BCB9A4F042FF15D73615EF5E83FCA9A3D5A
+ 7E14737A5704F1F1773BCE41F4E486D1CEC5183EFAC6BD2722882F12B12A8CCF
+ 8ED1268450F9F69857BFD5F33254124BD510C0783CFA3F1BBE90783EA7619F51
+ 9B813504D6E2FF6B75002E9D624047169362E09C09CE0B50DB10FF9FA57310EC
+ 8B49C6A7DF07E5E797847937FE2DF9B147CC2E709E2359DA3986FB322F3FD05C
+ BF1EE3DD7D32AE41507F3410F3E05704F1F1777BAC9D2914333D68EF076A1EF0
+ F8986BFEC1AA30FE46CEBD2964F9384059B81795632F29AF87DC33E763FDE16C
+ 900B24BB58F1FA2762F97C75ED0F1B43A2CB21AA2E4186973D354782F5000A82
+ 5DE14C8013D5573C3E9C1F883B62CE556B408049CCA7D9F8F8FE667A8D72E35B
+ F0F3ADB4F75D089113DFD5506D893FF758A9DE467B2F84CA988D731CDAFB3E59
+ 15C4C7DFF13AFB3F01572335A9FB813A9B5CA62B5492FF158D59915074DC1F18
+ CE07416BDF5A7D70617CB6969AF4E390D61ED217752AD77EB3FDC179B2EAD450
+ 98EC2F25560623F559D49A0F77DACEC2D3EB9570FB523EC4FA5A8BE50BAE03F0
+ 1955FF1FFB851A8923062A94FF6FAFA70CD6E4DC391AABC1F5FA4C981AB90057
+ 1B4BF9EEC1044F7B783E791BA686AA616EA4A6607CBCED7B92F0459999F66EB8
+ DF730EE66EB7C0CA9B5710697750E0F8F435D5C1F2AB3998BB51B73C3B52DBC7
+ AAC96EA6B1BB6CAB6CBC66AE5E3845B157975FC3C2EC8CD0F3D3782E8FCA0558
+ 7E358F7D589A19A939C58ABD6F35D73C2FDE17A647EA2836EBEFB8BB9D40FE50
+ 773B7B9BE597B3B826C8EAF46815B53EBBA5969296FE816DAF24E57B1ED6A36A
+ EDBF9EB9CF6EFBE6C065605A71CFC19E8E0E81D59595B50D5657E0F944CFF2EC
+ 68CDBDA7B7AAD87540C8DFB7CD35F7C4E82B6F7B29491F12421CA8BA72AFA727
+ D87D78746F0C6A724F41514A1C75DE57969739D8BDABB32335CFE76FD408D5A2
+ 9B6B1FD866A6A9946AA2BE7308FBA3B54F747D868C68779819AA82C5A97B20EC
+ 6F75F90D3C1FEF7943D8B3D3C3959F481CFFD7D27ADB526BEF1F708EC4527BAF
+ BD85D65E4F4BCD3D26161AFBB6639D80E9C1F203E4DE9A9ABBD5F862716A0C96
+ 169E50D7FB9BF949783539BC343752FB666EB4B677EA7ACD3B328BFD8F16FFC3
+ DC48A50DB9BFBA08EBC9DC48F5EBD9D1F313E45C97CF0C567E26495B8AF8BF22
+ FEAF88FF2BE2FF8AF8BF22FEAF88FF2BE2FF8AF8BF043EE8112D8865EC81F8E4
+ 4F2131F34F10776C0744FB1F0086959ECCE3FFC7A276417ADD4790D1F0219FA5
+ 9CFB3DB8BA7F26B3FCFFA4ACFF12C8E5B4F4FA5F2F9DAAFF90F6FCFFA3614A62
+ D9675AFF0CA71AA9B1F932B9EE57B4E5FF336D7421BDF66391ECA2CEFDB0B4FC
+ 12F22F6E5B7BAFF143DAF2FF9DEDB7896467367E0C4FE68761E47E3EE7FBB4E5
+ FFBBFAFE818B5773C58C35CE940D8CA5C2ECF331C86EFA1DE7764BF1DDFF4C4B
+ FEBF67C8EFB9F8732FC6E1CBA797E074CB1FA1A2571F96565E41598F36FFD8B4
+ 7D484BFEFF61BB3FF25D678F67FAC831DF85F9171370F94EBCA0F3425BFEBF81
+ E69F049CF3DFC0C89767E1C15407D7B96019B90769CDFFF78FFE9DD8FB8FC316
+ 339B3EA035FF5F47E5CF9050F4F126F91FC824FF3FADE5C37748FB75C2B9BF7E
+ 9151FFA113694EA6F9FF19F51F98A4377C7096306F129B4B6FF8B09D1C73427A
+ E3C79BCEFF57D4FF57D4FF57D4FF57D4FF57D4FF57D4FF57D4FF57D4FFDF4CFD
+ 7FDC0EB50058CF41589B92F06561DF343E5DF5FF7DFCF6824DEE6FC5DAA1FC5F
+ CF9997BF779DB2B2F7F4E8AAFFEF19BC0B489B7C567E2301AA6F9D10F89959F9
+ BBF674D5FF17C66F18CB81D67B0562F9D2D6FFA78BBFD5FAFF4E01DB69E74B54
+ 77DDF9F7DF187E508B2A1CAEFA2D1FDFBAEA23086955E7E2D355FF9F937F67AA
+ 1FEE4C0F805DCDEFD87CECCF8D27DD303E3B0C1615BF64F3E9AAFFCFC977A8F9
+ 038CCD5CA358ADE385D03E514CF5E7FEDC2838D6FE07D7F1D355FF9FF7FCDB56
+ FF2BDC7CDA0B0BAF67E1D9E234D51FFB9ADFF39D7FBAEAFF0BBAFE6CAA3E86BB
+ 33D7E1C1FC2DAA3F82AE3FBAEAFF9BFAFC7142D0356E55F921E9C76F845EFF74
+ F9FC6615EF5A0A62883251FCE2E2E2BFAB48F4D6257E6B61FB69C6ADEEFCB0C9
+ 2B9F47CE0F96C52CA2B6FE1EF1AFEFD625AC623E00EAF5FB3E8FA0E2FF6DD921
+ 576A52FD8E16C7BBFF9BA4C75097ECFCDD868CC0ECDE82F0A7A82D903ADE5B7E
+ F44D7B2EE34E4D8AAF8948FD3F39D6EA149F0CDC5E56BE5F771E73B2E0A887BE
+ 00FEB7C8B80ECAC3FFC49C8AF65CA603279F9C5F7B79FADF37AA8EBDC6F1DEF0
+ FF7D72E5C91F2D3F0619BE1BDA9422A6E7598C55CB8B8FFEEC6986DBDB9CFE1F
+ C6F8D04FC6BEC92CF7E27418956380BE012F9F536F8F7174D4638C5F48A443F7
+ 42F9E658F790D33711C617A4FDC7D83E6AFDB14FE8EFDFA83846D552E4D41AE0
+ 5C05D690C4FC099CBBC0B1E4D51D48CA1767D8BFADFACD74F0A5314E7EB6EF91
+ 2C79B22F11BF34DAC1E1C76CFFCB522FB798E929377E02A589B77C9BD3FFC318
+ 37D6CBC3732A2BEE45E2CFE31CC09ABFC0CDDFD0DA9B4061881BAD3508714E23
+ C3CB8E47132C98CF69B1F607219DEC877E3DFAFB38A7D623647C2EAFD739C439
+ 81DA187F4AEF90EC6ACDA73D90842F548F408E03C7096B39621F5157C194D85F
+ DC3A9F1EDBE0FB1CD4CD95271BF5EC0EAAAA3FDEF8DDBF273B80E6DC7F51E664
+ A806A8A5E55CFFCD40E533A04B0391EA7518CEA731E1B88B25DF71BB1036B536
+ 1C0F9FE5431C54DF25753FC2AC0CE0515F11A5891EAE3B0545C7FCC0C75C0774
+ F77FB2B1369D103EA7AE7D2B3908542D420B3D68C889E25AF3FBEB8152A8CB8D
+ 82402763D0DEFF57B17CE17508B781B1EA7630D7D80D565A7BA93EE298111F88
+ EA336B3B674B4DA1EB8F8F7715C057FDA5493383B5FF2ACBF5FF861BB384F661
+ 7AB0627876A8466B6DFD4BA55459F0D3A35CF9B8D8A7704F4BF0323363D74667
+ 30767EC74065FB1CDD7C0BDD3D546E008BFDF47A39B4972480B5EEFE737CF5F6
+ 74F6FC455FF9B3E774F70179C89EEC2F01477375B873F1CCE2DC70F579F8A24E
+ A00E1A6B43D0B506215AB4AF35C5AFC8603EC59C82E7C3553F27AF4789D5A256
+ 5E983F68A5B37F9799E6EE3463B59D2392E643A056C14075FB146A178E98A885
+ 4E0F554ECE8F16B3E3BE0B83E53F9B1DAA1A991DAEAE16D507DEFA10D6BACAFF
+ 8E7922E4FBDA99F42DDA4C4B299BDC8727717E02EB10625D42D427E0F5C4B9EF
+ EC68C51F78DB5BB85AF753320657047DB691136FFD93AA145F578C9FA35F8FFE
+ FDB592E8172354FE7FFC5AFE7F4DDCCA70792C57FE7F437A407E5982AFEA56F2
+ FF2B12DCDE6E3A1558DA7F2E72E19E9475D06FD5C4AD62FE7F4DB28F8B5836F1
+ 47CF9FC4F87FDCB22C7C2F5CCFA03CC1DB4A181F7314E4A0BD5F2D8EF3E4AB79
+ 91116EF1CB3B72AAFFDF961D7C8F978FFA7FF44DE5C1AF3DEEF7942FFF21C845
+ 057D4559FADE681D590C683A1EBC2088CFF6BD9382A8DAF9B4D69E288864FBDF
+ CD22F89C7A659CA3C05C84CB6723245E8F00FBDFB95EFBBF797DBE8123175A2C
+ 5F909FDD4ACE0F1E03F68BCAF34F0ADAD0FCAFE7FD234B54DC9FF285B6C0A739
+ 179C8F9FE1E3A0252F7E435C101F1FF5D72561B2F7BFD1474C74B19A16C447CD
+ 38C69165C5C66BE8B49F238458E80B3C7ED66F67AC5F5F1DE54BABF61FF3F023
+ 0F1BAFD70613CD6759A48D31A5A7C71CFB0B4703A027356253E3DBBE1EF3C73C
+ 06D4ECF3E6016F962F50E34CF9DDC694DF8DE394E46205C71D2DA858BF703F5F
+ 9F363E1D2688EF6AA4AA212B5EAC93159C49888238375B56FDBD797ECDED5E15
+ 67435599F0F312A3A1A7A3054AB252291FD25C73F7AC203EFE6E75217D9036F7
+ 3E3DCC0FAA0B72E064A80FA4317CA1EB6223C5474B8E0E81A3617E8BE4F9C5AE
+ AEE6BF0AD2FFA30FE962A4B6651D4075610E9B27C6E2C4D5BF437FDD5A7B1F15
+ 7BC7F51902D663EE213C730AB83E00F637C04C174E46047271AE5EEE82DB3706
+ E14A6F3BD7FBBD9D4DDBA4ADBFA725E0BD18A61F9B717FFC0ECCCD3E858567B3
+ D4E39D9B431B7DE86CD5A1B3FE9FB9BE32A427C7B2DBBFD2738962AEAEAEAEE5
+ BB2F2FC1ECF4D7E4B85B59DB2CF576361FED6F6AFA91B186D2CF750F7CBA2C0D
+ DFDBD98A6B7C07AFF611FED446EE37E9C7FCDC14E917F779E8EE6EFB88157396
+ 866FA0B603023D1DA0ADB196DDF6F4D457B0B8F812565696E1E58B05987C7C7F
+ 83DBD172979C038D510EFF0F6BCA1BAAEE98942A0FC3D694CDB83ED0038F1F4D
+ 50E7E1C1FD3118B8DCC971DC2DEF08CF7357D232D5D8D58B7EB8B8BC7B5EF372
+ 3AB4A9FBAFB3B3F5D79BF57B31D7FEA0C6EE2213F55D2DC6EA3BAFAEC7E02731
+ 2FC04875C703D40A98AAEFEA21DBD415E765DEE4E02C09E3F776347BCA4277DF
+ D6D6F63669DBB5ABABE1677D7DCDFF489DE735E6F3EEF65625623B7A3A9A3DFA
+ FBFBFF5E96FA7F96F5B6B7EA52FCF6567749F7AD8DF6FB716D8AAF734B567043
+ F7D9B071D4F7A3CE1FF5FEA8FB17A4FFC7ED707BDC0FF79758FF9FC6F8597356
+ 70DD4091F4FEFF3D4AFF1FB980ED61BB22731D18CE3FBC901E508DF31932D1FF
+ 93762F9C0CA8460E2F7BBCEDF4F7AE97444FCA45FF4F38C8E39E7B088C9567FC
+ 1D799CFCCAE37E55F2E4238FABFE5B844F1DC6A8E5C1460EF204D59F431F16E3
+ DBB2E062BB2CFD3FF284D5BFC378366E87F50286CBA4D3FFE3FED80EB6C71927
+ 17C5E7D3FF137F06FD7BD4F553FA7F327E3D6736F4FFF8D8C3ABFF27DB8BCAE1
+ 96842F0BFBA6F14F78D89EBB2C27367290C7ADBFD6AFCB0B72960B1F39C8E3AD
+ 3F87F163D4AD371F0F91D1BC4F08BB0620F244D5BF3BE17E784DFF9FC4905267
+ C1A0DAC1F6B8D6BF13C3E7D3FF7B70EBFF719E86A5FF6FE4D2FFBB53DBE1F6B8
+ 9FD0F5F724E04B6B5807EB448817E42544C329E29B453998CB8D1F4B7C92C6CA
+ 22E86E6F86DAA23C686FAEA32C2332E41AD7FC8389E639DA8FFB9001D4977F0E
+ 5505D910E368B95E17CF18728F4740E7C5C6E5DE4B8D1F70C47FEB505B4E271F
+ 4B1DE3EFCE389E5A68C869BE50F99C7C16C15B7FCE4E773F2D6B10A265C78442
+ 03197B76CE056917DB47CEA9E4D82FBA3B9B2B85D5BF43BDBDCF26D7FDE39BB7
+ 3B6C0CF9111E509E160BE7CFA64316D3159202ED81E961CEB6C2F498BB83BD4D
+ 85187FC61A68A2EAEF192A6F27FD3E2052FFEFBFAEFFC7CF239DCC85C6BC05D9
+ CC50A59FB4F5FF38CDDE54F51BC7EF283C0E896E56507ADC5F201F73B8B564C4
+ 9FBA5E01511CDF8583B5E97C7CEA1A54DFD52CABE34FF5B665D771B9D79E2F90
+ BF5E8731DC404A0D8020FEE4E5628820F7C5E5B21481E3CF97FBAFB9D797F8F4
+ 37B7529351D8F5875AA0B1B6339BE273E5226829FFD25C6B0FC354635713EAFF
+ 8D55778E19F1EAFFC96B7C1F3FF7B737EA16C4FFAABF44E8F54FA7BF3F3554F3
+ 91A4F79F22FF5F91FFAFC8FF57E4FF2BF2FF15F9FF8AFC7F45FEFFFF84FC7FAC
+ 019FE66B0FA5F10150732214B2439C217ABD4FB2E6572406C193AB65F0F87211
+ 0C9DCF80EB356994FE1A7F6F75125F24C2E160872CF2FFD1CF40DE446701E411
+ 1F94AA05E8680E71CE6B3A101C8FD1FA4C78D85BF432C6DEB48F61A5FB9F6BFA
+ 677AF2FFF1D8EEB49CA67CE073B13EF0655721FB77E617ADB9507F2A9CEA636F
+ 7112C43A1C5C8E733AB49F53FF2D4DFE3FD6FB7F4CFC8C38270BC28910FA7BB7
+ A738913D3FD27D2EA14C90FE7C2BF9FFFDE5A9D09C13051901470472EF771540
+ 7F452A65782D52F5E0CF67BC04607C9B8EFCFFFB64AC4FF8D842775182403EAE
+ 4390E461CD65379B72606AB8FC6369F5F7C61A3B29069E7B497C0FCAFF18A932
+ 92968FF90C787FA19FDF7EF618DBF0BE13E2F3C069862BB90FCE91D7153BE9C8
+ FFBF527382FACE89B63785CC2027CAEAD29802F9D8AF1887833837B03AD35FFC
+ 233AF2FFCF26FA517CBCAEAF559F143ADE53D7CA21CDCF1EAA5343F035D73CA4
+ 34F9FF866ADBA9BAAF398C35AD1B5E5B7CF300574AA8EF25FC1E7A7AAD6C797A
+ B0FA2F027DEE2DE6FFE33D759B5C836D6762A971C0798FBAF430E8FA3C1EAAC8
+ EF421CF39C50177844CEFBDC4875F466FC5149F2FF0FEBECBB13E16E39F0A0F7
+ DCF4D8C533D09A1B0BF9911ED4774269BC3F0C549EC07158981BAAB49365CCFF
+ 4177F1F709C77376B8B2943CDE9B1DAE9E268F4D78CCB3D72ADEE5DDFEFF03C9
+ 0A9EC0
+ }
+ end
+ object PopupExtract: TPopupMenu
+ Left = 68
+ Top = 101
+ object MenuItem3: TMenuItem
+ Caption = 'Extract Selected File'
+ OnClick = Extract1Click
+ end
+ object MenuItem8: TMenuItem
+ Caption = 'Extract All Selected Files'
+ OnClick = ExtractAllSelectedClick
+ end
+ object MenuItem4: TMenuItem
+ Caption = 'Extract All'
+ OnClick = ExtractFiles1Click
+ end
+ end
+ object ImageList2: TImageList
+ Height = 24
+ Width = 24
+ Left = 632
+ Top = 304
+ Bitmap = {
+ 4C7A0600000018000000180000004C0400000000000078DAED5A4B485451189E
+ C9478BAC16A68B1E2069264911D142484C6A1B31E8D8C3125B1664318D161166
+ 8FA10C05C9484A455A14F420899016998FB2369A42AD82D28628A31659D6A2B2
+ C6FE83DFC0E1721FE7DC7B4F35727FF898CBB9FFFFDD73CFEBFFCEB9E3F3FD13
+ 4B226C2454118E5880F9142146C4CA0851C2B4245E134A2DB84FC07710BEE902
+ F5613E41C210628F9BD49BDD6F977857DE92091DE028D169EF28EA9DECA0DF58
+ EC30614C53C72283E7DAB120B80AB9B22A94A5BBC09F01AEFD5C591DCAFC02F1
+ 6D8480C97D3FB8EA74C68D88F510A6D00E46360D4E3BFCF3087D845F847207FC
+ 99842E42B70E7A0913841821F49FF28BB4CF4E05ED6FA77F558FCFF8FC5AA468
+ 7EC5D7875217F8CB74D68724ACDF430ED7B714C2086154670D2EC5733B6C3E83
+ 715FC19835EA9F5A3CE329DE3343B0BDB7A1DE8CFB98857F09D66FD9FC386A31
+ AEB4F9A610E32A42A83740043E1B6CE6BC44354FFF78FA27D1F44F00B9C5CAEC
+ E89F2072628FE03BC8E45F364E7F121E13E6BBCC1FC29A3B014DA2A755BAA065
+ FE477EBE7D9E28681FB7FA57F5F8F4F48FA77F3CFDE3E91F4FFFA8D53F190273
+ DA89FEB907A83AFFE903DCD63F32FC4ECE1F1291BF1D9C691C7FFCBADD05FE00
+ B4C900E1113080B280CBFAE733A0E2FC2788FC17B3E076A27F0E029EFEF1F48F
+ A77F3C635643F842F8A4012BAB76817F92B04CA77C319EE1D4A66CDED3B3621B
+ F34A8B6213FEE584FB0EB8BBC16166050EF80B04DA285B13934318C7752DD62F
+ 76FD1175E57DB305F8176A62D6115EE8F0BF22ACD5F82E10ECE71F9AFE1AD4E1
+ 1FE1F2DE3462FC82FCE35CDC56C2031DFE7EC216CEEF9DC4387DCEC5ED2274EA
+ F0DFF5CD7C1F8CFB3D93E0EFE5E2F621EF69F9AF12F6727E3D12FC37B938B647
+ 6CD6E16F211CE6FC6E48F0B770711140CBCFF2D769CEEFA204FF292EAE19EFA0
+ E567BFE739BF9312FC076CCCDD2A09FE721BFCE512FCF998FFA2DC1F08ABBC54
+ 3C2BAC9290A588BB09E3658F02EE7A703729E06E0037DB97B26F02EC7F094B5D
+ E48F223FC5B839C5AED93781CD2EF0E7223FB179BA9EB09A10E6F6212DD81F89
+ D81CC235E84EDEF208EF811C94A512CEE25D6E09E6DFA3A853A5CE3DF68C3784
+ 0A4D79083135027BB56F92B9286E9DD0BB667B4296477E1356D8E05F89760A9B
+ F83CC41EDBAE0D5B9C0FB1BEBBE480BFD54207B1317EC6013F8BFD6EA1DB2E3B
+ E067DFAFDE9ADCEFC7D9805D1B813633B26A8C815C07E3E790894F26F673B76D
+ F0DFC1F8B73AA3AAC15C0C497087111316F0F5632D89616D4935F19D4B3807DF
+ EB12FA3F85D3A06378A73538F74CC3750DCEBC98CF059B67529B7C33DFC5633A
+ 9A2A867C53ECC2FACF72D50EF409C376C2124FEA78E6A2EDE6F2BE0A8B223FE5
+ 29E2E73552BE895F96CFFA9BA9111AB1FE4E9ACCEB0A83F540166D0ADAE86F68
+ EC2645FDFB12ED6F658DF055B9FF6948B0BE6975613CC674747BDCD87F11BE42
+ 9BB7F98CBF57982162B16F159DDF4E2CBE078A2A5C0773B0D67A360BEC0F3835
+ D7F8
+ }
+ end
+end
diff --git a/UMain.lrj b/UMain.lrj
new file mode 100644
index 0000000..c217020
--- /dev/null
+++ b/UMain.lrj
@@ -0,0 +1,111 @@
+{"version":1,"strings":[
+{"hash":145109307,"name":"tform1.caption","sourcebytes":[68,97,116,97,76,111,99,107],"value":"DataLock"},
+{"hash":91841967,"name":"tform1.label1.caption","sourcebytes":[80,114,111,110,116,111],"value":"Pronto"},
+{"hash":146593836,"name":"tform1.statuslbl.caption","sourcebytes":[83,116,97,116,117,115,108,98,108],"value":"Statuslbl"},
+{"hash":41860963,"name":"tform1.img_sd.hint","sourcebytes":[68,97,116,97,76,111,99,107,32,83,105,103,110,97,116,117,114,101,32,83,116,97,116,117,115],"value":"DataLock Signature Status"},
+{"hash":198598593,"name":"tform1.label3.caption","sourcebytes":[32,69,115,112,108,111,114,97,32,99,97,114,116,101,108,108,97],"value":" Esplora cartella"},
+{"hash":174550499,"name":"tform1.label2.caption","sourcebytes":[83,101,108,101,99,116,101,100,32,70,105,108,101,115],"value":"Selected Files"},
+{"hash":106991073,"name":"tform1.toolbar1.caption","sourcebytes":[84,111,111,108,66,97,114,49],"value":"ToolBar1"},
+{"hash":21703,"name":"tform1.btnnuovo.hint","sourcebytes":[78,101,119],"value":"New"},
+{"hash":190169183,"name":"tform1.btnnuovo.caption","sourcebytes":[98,116,110,110,117,111,118,111],"value":"btnnuovo"},
+{"hash":353982,"name":"tform1.btnapri.hint","sourcebytes":[79,112,101,110],"value":"Open"},
+{"hash":162826217,"name":"tform1.btnapri.caption","sourcebytes":[98,116,110,97,112,114,105],"value":"btnapri"},
+{"hash":196648531,"name":"tform1.btnagg.hint","sourcebytes":[65,100,100,32,100,105,114,101,99,116,111,114,121,32,97,110,100,32,102,105,108,101,115],"value":"Add directory and files"},
+{"hash":110839767,"name":"tform1.btnagg.caption","sourcebytes":[98,116,110,97,103,103],"value":"btnagg"},
+{"hash":78392485,"name":"tform1.btndel.hint","sourcebytes":[68,101,108,101,116,101],"value":"Delete"},
+{"hash":110840508,"name":"tform1.btndel.caption","sourcebytes":[98,116,110,100,101,108],"value":"btndel"},
+{"hash":217810916,"name":"tform1.btnestrai.hint","sourcebytes":[69,120,116,114,97,99,116],"value":"Extract"},
+{"hash":80400841,"name":"tform1.btnestrai.caption","sourcebytes":[98,116,110,101,115,116,114,97,105],"value":"btnestrai"},
+{"hash":366789,"name":"tform1.btnsalva.hint","sourcebytes":[83,97,118,101],"value":"Save"},
+{"hash":190416209,"name":"tform1.btnsalva.caption","sourcebytes":[98,116,110,115,97,108,118,97],"value":"btnsalva"},
+{"hash":118418750,"name":"tform1.btnsig.hint","sourcebytes":[67,108,111,115,101,32,97,110,100,32,115,105,103,110],"value":"Close and sign"},
+{"hash":110844407,"name":"tform1.btnsig.caption","sourcebytes":[98,116,110,115,105,103],"value":"btnsig"},
+{"hash":77500789,"name":"tform1.btnchiave.caption","sourcebytes":[98,116,110,99,104,105,97,118,101],"value":"btnchiave"},
+{"hash":160486417,"name":"tform1.toolbutton1.caption","sourcebytes":[84,111,111,108,66,117,116,116,111,110,49],"value":"ToolButton1"},
+{"hash":145109307,"name":"tform1.panel5.caption","sourcebytes":[68,97,116,97,76,111,99,107],"value":"DataLock"},
+{"hash":139204663,"name":"tform1.panellog.caption","sourcebytes":[80,97,110,101,108,76,111,103],"value":"PanelLog"},
+{"hash":171904661,"name":"tform1.speedbutton1.hint","sourcebytes":[83,101,108,101,99,116,32,102,105,108,101],"value":"Select file"},
+{"hash":11472597,"name":"tform1.menufiledeselect.hint","sourcebytes":[68,101,115,101,108,101,99,116,32,102,105,108,101],"value":"Deselect file"},
+{"hash":37355603,"name":"tform1.extractallselected.hint","sourcebytes":[69,120,116,114,97,99,116,32,115,101,108,101,99,116,101,100,32,102,105,108,101,115],"value":"Extract selected files"},
+{"hash":210597155,"name":"tform1.deleteallselected.hint","sourcebytes":[68,101,108,101,116,101,32,115,101,108,101,99,116,101,100,32,102,105,108,101,115],"value":"Delete selected files"},
+{"hash":59203395,"name":"tform1.menufiledeselectall.hint","sourcebytes":[68,101,115,101,108,101,99,116,32,97,108,108,32,115,101,108,101,99,116,101,100,32,102,105,108,101,115],"value":"Deselect all selected files"},
+{"hash":2805797,"name":"tform1.file1.caption","sourcebytes":[38,70,105,108,101],"value":"&File"},
+{"hash":4890740,"name":"tform1.menuitem2.caption","sourcebytes":[67,114,121,112,116],"value":"Crypt"},
+{"hash":177351,"name":"tform1.menuitem1.caption","sourcebytes":[38,78,101,119],"value":"&New"},
+{"hash":2844350,"name":"tform1.open1.caption","sourcebytes":[38,79,112,101,110],"value":"&Open"},
+{"hash":2857157,"name":"tform1.save1.caption","sourcebytes":[38,83,97,118,101],"value":"&Save"},
+{"hash":118276926,"name":"tform1.close1.caption","sourcebytes":[38,67,108,111,115,101,32,97,110,100,32,83,105,103,110],"value":"&Close and Sign"},
+{"hash":254313481,"name":"tform1.convert1.caption","sourcebytes":[38,67,111,110,118,101,114,116,32,40,116,111,32,46,101,120,101,41],"value":"&Convert (to .exe)"},
+{"hash":4710148,"name":"tform1.exit1.caption","sourcebytes":[69,38,120,105,116],"value":"E&xit"},
+{"hash":238928387,"name":"tform1.preferences1.caption","sourcebytes":[38,80,114,101,102,101,114,101,110,99,101,115],"value":"&Preferences"},
+{"hash":92680803,"name":"tform1.confirmations1.caption","sourcebytes":[67,111,110,38,102,105,114,109,97,116,105,111,110,115],"value":"Con&firmations"},
+{"hash":111653829,"name":"tform1.compressionmethodtouse1.caption","sourcebytes":[38,67,111,109,112,114,101,115,115,105,111,110,32,77,101,116,104,111,100,32,84,111,32,85,115,101],"value":"&Compression Method To Use"},
+{"hash":45790853,"name":"tform1.store1.caption","sourcebytes":[38,83,116,111,114,101],"value":"&Store"},
+{"hash":180169221,"name":"tform1.deflate1.caption","sourcebytes":[38,68,101,102,108,97,116,101],"value":"&Deflate"},
+{"hash":2788516,"name":"tform1.best1.caption","sourcebytes":[38,66,101,115,116],"value":"&Best"},
+{"hash":209459491,"name":"tform1.deflationoption1.caption","sourcebytes":[38,68,101,102,108,97,116,105,111,110,32,79,112,116,105,111,110,115],"value":"&Deflation Options"},
+{"hash":190223196,"name":"tform1.normal1.caption","sourcebytes":[38,78,111,114,109,97,108],"value":"&Normal"},
+{"hash":64946573,"name":"tform1.maximum1.caption","sourcebytes":[77,97,38,120,105,109,117,109],"value":"Ma&ximum"},
+{"hash":2803876,"name":"tform1.fast1.caption","sourcebytes":[38,70,97,115,116],"value":"&Fast"},
+{"hash":208626884,"name":"tform1.superfast1.caption","sourcebytes":[38,83,117,112,101,114,32,70,97,115,116],"value":"&Super Fast"},
+{"hash":234885267,"name":"tform1.extractoptions1.caption","sourcebytes":[38,69,120,116,114,97,99,116,32,79,112,116,105,111,110,115],"value":"&Extract Options"},
+{"hash":123027443,"name":"tform1.createdirs1.caption","sourcebytes":[38,67,114,101,97,116,101,32,68,105,114,101,99,116,111,114,105,101,115],"value":"&Create Directories"},
+{"hash":66700264,"name":"tform1.restorepath1.caption","sourcebytes":[38,82,101,115,116,111,114,101,32,80,97,116,104],"value":"&Restore Path"},
+{"hash":233813726,"name":"tform1.logging1.caption","sourcebytes":[38,76,111,103,103,105,110,103,46,46,46],"value":"&Logging..."},
+{"hash":14613438,"name":"tform1.password1.caption","sourcebytes":[38,80,97,115,115,119,111,114,100,46,46,46],"value":"&Password..."},
+{"hash":214729811,"name":"tform1.storeoptions1.caption","sourcebytes":[38,83,116,111,114,101,32,79,112,116,105,111,110,115],"value":"&Store Options"},
+{"hash":50205701,"name":"tform1.recursetree1.caption","sourcebytes":[38,82,101,99,117,114,115,101,32,84,114,101,101],"value":"&Recurse Tree"},
+{"hash":44494963,"name":"tform1.removedots1.caption","sourcebytes":[82,101,109,111,118,101,32,38,68,111,116,115],"value":"Remove &Dots"},
+{"hash":967480,"name":"tform1.strippath1.caption","sourcebytes":[38,83,116,114,105,112,32,80,97,116,104],"value":"&Strip Path"},
+{"hash":82476771,"name":"tform1.showemptyfolders1.caption","sourcebytes":[83,38,104,111,119,32,69,109,112,116,121,32,102,111,108,100,101,114,115],"value":"S&how Empty folders"},
+{"hash":222564494,"name":"tform1.tempdirectory1.caption","sourcebytes":[38,84,101,109,112,32,68,105,114,101,99,116,111,114,121,46,46,46],"value":"&Temp Directory..."},
+{"hash":2871239,"name":"tform1.view1.caption","sourcebytes":[38,86,105,101,119],"value":"&View"},
+{"hash":148062579,"name":"tform1.attributes1.caption","sourcebytes":[38,65,116,116,114,105,98,117,116,101,115],"value":"&Attributes"},
+{"hash":253755893,"name":"tform1.za0.caption","sourcebytes":[38,67,111,109,112,114,101,115,115,101,100,32,83,105,122,101],"value":"&Compressed Size"},
+{"hash":197171188,"name":"tform1.za1.caption","sourcebytes":[67,111,109,112,114,101,115,115,105,111,110,32,38,77,101,116,104,111,100],"value":"Compression &Method"},
+{"hash":222513535,"name":"tform1.za2.caption","sourcebytes":[67,111,109,112,114,101,115,115,105,111,110,32,82,38,97,116,105,111],"value":"Compression R&atio"},
+{"hash":285539,"name":"tform1.za3.caption","sourcebytes":[67,38,82,67],"value":"C&RC"},
+{"hash":71082275,"name":"tform1.za4.caption","sourcebytes":[38,69,120,116,101,114,110,97,108,32,70,105,108,101,32,65,116,116,114,105,98,117,116,101,115],"value":"&External File Attributes"},
+{"hash":100049187,"name":"tform1.za5.caption","sourcebytes":[38,73,110,116,101,114,110,97,108,32,70,105,108,101,32,65,116,116,114,105,98,117,116,101,115],"value":"&Internal File Attributes"},
+{"hash":171998462,"name":"tform1.za6.caption","sourcebytes":[69,38,110,99,114,121,112,116,105,111,110],"value":"E&ncryption"},
+{"hash":124852336,"name":"tform1.za7.caption","sourcebytes":[38,84,105,109,101,32,83,116,97,109,112],"value":"&Time Stamp"},
+{"hash":228663797,"name":"tform1.za8.caption","sourcebytes":[38,85,110,99,111,109,112,114,101,115,115,101,100,32,83,105,122,101],"value":"&Uncompressed Size"},
+{"hash":182749193,"name":"tform1.za9.caption","sourcebytes":[38,86,101,114,115,105,111,110,32,77,97,100,101,32,66,121],"value":"&Version Made By"},
+{"hash":240085892,"name":"tform1.za10.caption","sourcebytes":[86,101,114,115,105,111,110,32,78,101,101,38,100,101,100,32,84,111,32,69,120,116,114,97,99,116],"value":"Version Nee&ded To Extract"},
+{"hash":76815668,"name":"tform1.filecomment1.caption","sourcebytes":[38,70,105,108,101,32,67,111,109,109,101,110,116],"value":"&File Comment"},
+{"hash":5297733,"name":"tform1.none1.caption","sourcebytes":[78,38,111,110,101],"value":"N&one"},
+{"hash":277804,"name":"tform1.all1.caption","sourcebytes":[65,38,108,108],"value":"A&ll"},
+{"hash":197386388,"name":"tform1.default1.caption","sourcebytes":[68,101,102,97,38,117,108,116],"value":"Defa&ult"},
+{"hash":224752558,"name":"tform1.font1.caption","sourcebytes":[38,70,111,110,116,46,46,46],"value":"&Font..."},
+{"hash":45793317,"name":"tform1.style1.caption","sourcebytes":[38,83,116,121,108,101],"value":"&Style"},
+{"hash":210380553,"name":"tform1.hierarchy1.caption","sourcebytes":[38,72,105,101,114,97,114,99,104,121],"value":"&Hierarchy"},
+{"hash":62331556,"name":"tform1.os1.caption","sourcebytes":[38,79,110,108,121,32,84,101,120,116],"value":"&Only Text"},
+{"hash":188813,"name":"tform1.os2.caption","sourcebytes":[43,47,38,45],"value":"+/&-"},
+{"hash":182716115,"name":"tform1.os3.caption","sourcebytes":[38,71,108,121,112,104,115],"value":"&Glyphs"},
+{"hash":87452275,"name":"tform1.os4.caption","sourcebytes":[38,43,47,45,32,97,110,100,32,71,108,121,112,104,115],"value":"&+/- and Glyphs"},
+{"hash":190037381,"name":"tform1.os5.caption","sourcebytes":[79,110,108,121,32,84,38,114,101,101],"value":"Only T&ree"},
+{"hash":263772435,"name":"tform1.os6.caption","sourcebytes":[38,84,114,101,101,32,97,110,100,32,71,108,121,112,104,115],"value":"&Tree and Glyphs"},
+{"hash":45132867,"name":"tform1.items1.caption","sourcebytes":[38,73,116,101,109,115],"value":"&Items"},
+{"hash":106317294,"name":"tform1.addfiles1.caption","sourcebytes":[38,65,100,100,32,70,105,108,101,115,46,46,46],"value":"&Add Files..."},
+{"hash":249863950,"name":"tform1.deletefiles1.caption","sourcebytes":[38,68,101,108,101,116,101,32,70,105,108,101,115,46,46,46],"value":"&Delete Files..."},
+{"hash":142412926,"name":"tform1.extractfiles1.caption","sourcebytes":[38,69,120,116,114,97,99,116,32,70,105,108,101,115,46,46,46],"value":"&Extract Files..."},
+{"hash":133078286,"name":"tform1.freshenfiles1.caption","sourcebytes":[38,70,114,101,115,104,101,110,32,70,105,108,101,115,46,46,46],"value":"&Freshen Files..."},
+{"hash":671,"name":"tform1.help1.caption","sourcebytes":[38,63],"value":"&?"},
+{"hash":45006757,"name":"tform1.contents1.caption","sourcebytes":[38,71,117,105,100,101],"value":"&Guide"},
+{"hash":163200722,"name":"tform1.abbreviaontheweb1.caption","sourcebytes":[68,97,116,97,76,111,99,107,32,111,110,32,116,104,101,32,119,101,98],"value":"DataLock on the web"},
+{"hash":56535007,"name":"tform1.about1.caption","sourcebytes":[68,97,116,97,76,111,99,107,32,73,110,102,111],"value":"DataLock Info"},
+{"hash":142032114,"name":"tform1.opendialog1.title","sourcebytes":[79,112,101,110,32,68,97,116,97,76,111,99,107,32,70,111,108,100,101,114],"value":"Open DataLock Folder"},
+{"hash":171773589,"name":"tform1.menuitemselect.caption","sourcebytes":[83,101,108,101,99,116,32,70,105,108,101],"value":"Select File"},
+{"hash":11341525,"name":"tform1.menuitem7.caption","sourcebytes":[68,101,115,101,108,101,99,116,32,70,105,108,101],"value":"Deselect File"},
+{"hash":225940473,"name":"tform1.delete1.caption","sourcebytes":[68,101,108,101,116,101,32,83,101,108,101,99,116,101,100,32,70,105,108,101,40,115,41],"value":"Delete Selected File(s)"},
+{"hash":65072739,"name":"tform1.menuitem5.caption","sourcebytes":[68,101,108,101,116,101,32,70,105,108,101,115],"value":"Delete Files"},
+{"hash":168291657,"name":"tform1.extract1.caption","sourcebytes":[69,115,116,114,97,99,116,32,83,101,108,101,99,116,101,100,32,70,105,108,101,40,115,41],"value":"Estract Selected File(s)"},
+{"hash":132824492,"name":"tform1.menuitem6.caption","sourcebytes":[69,120,116,114,97,99,116,32,65,108,108],"value":"Extract All"},
+{"hash":227318814,"name":"tform1.freshen1.caption","sourcebytes":[38,70,114,101,115,104,101,110],"value":"&Freshen"},
+{"hash":74220478,"name":"tform1.move1.caption","sourcebytes":[38,77,111,118,101,46,46,46],"value":"&Move..."},
+{"hash":178622,"name":"tform1.run1.caption","sourcebytes":[38,82,117,110],"value":"&Run"},
+{"hash":108280834,"name":"tform1.savedialog1.title","sourcebytes":[83,97,118,101,32,68,97,116,97,76,111,99,107,32,70,111,108,100,101,114],"value":"Save DataLock Folder"},
+{"hash":153198629,"name":"tform1.menuitem3.caption","sourcebytes":[69,120,116,114,97,99,116,32,83,101,108,101,99,116,101,100,32,70,105,108,101],"value":"Extract Selected File"},
+{"hash":129880899,"name":"tform1.menuitem8.caption","sourcebytes":[69,120,116,114,97,99,116,32,65,108,108,32,83,101,108,101,99,116,101,100,32,70,105,108,101,115],"value":"Extract All Selected Files"},
+{"hash":132824492,"name":"tform1.menuitem4.caption","sourcebytes":[69,120,116,114,97,99,116,32,65,108,108],"value":"Extract All"}
+]}
diff --git a/UMain.pas b/UMain.pas
new file mode 100644
index 0000000..9920601
--- /dev/null
+++ b/UMain.pas
@@ -0,0 +1,2159 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+{$MODE Delphi}
+
+unit UMain;
+
+interface
+
+uses
+ LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls,
+ Forms, Dialogs, Menus, ExtCtrls, FileCtrl, StdCtrls, Buttons, EditBtn,
+ AbArcTyp, AbUtils, AbZipOut, AbBase, AbBrowse, AbComCtrls, AbZView,
+ LCLTranslator, ComCtrls, dos, fileinfo, ogutil, ogproexe, onguard;
+
+type
+
+ { TForm1 }
+
+ TForm1 = class(TForm)
+ AbMeter1: TAbMeter;
+ AbMeter2: TAbMeter;
+ AbProgressBar1: TAbProgressBar;
+ AbZipOutline1: TAbZipOutline;
+ DirectoryEdit1: TDirectoryEdit;
+ ImageList2: TImageList;
+ img_sd: TImage;
+ ImageList1: TImageList;
+ Label1: TLabel;
+ Label2: TLabel;
+ ListBoxtagged: TListBox;
+ Memo1: TMemo;
+ MenuFileDeselect: TSpeedButton;
+ MenuFileDeselectAll: TSpeedButton;
+ MenuItem2: TMenuItem;
+ MenuItem3: TMenuItem;
+ MenuItem4: TMenuItem;
+ MenuItem5: TMenuItem;
+ MenuItem6: TMenuItem;
+ MenuItem7: TMenuItem;
+ MenuItem8: TMenuItem;
+ MenuItemSelect: TMenuItem;
+ PanelLog: TPanel;
+ PanelMain: TPanel;
+ PanelMoveFiles: TPanel;
+ Separator1: TMenuItem;
+ OgDaysCode1: TOgDaysCode;
+ Panel5: TPanel;
+ PanelProgressBar: TPanel;
+ PopupExtract: TPopupMenu;
+ SpeedButton1: TSpeedButton;
+ ExtractAllSelected: TSpeedButton;
+ DeleteAllSelected: TSpeedButton;
+ SpeedButton5: TSpeedButton;
+ Splitter1: TSplitter;
+ Statuslbl: TLabel;
+ Label3: TLabel;
+ MainMenu1: TMainMenu;
+ File1: TMenuItem;
+ MenuItem1: TMenuItem;
+ OgProtectExe1: TOgProtectExe;
+ Open1: TMenuItem;
+ Save1: TMenuItem;
+ N1: TMenuItem;
+ Exit1: TMenuItem;
+ Items1: TMenuItem;
+ Help1: TMenuItem;
+ Contents1: TMenuItem;
+ N2: TMenuItem;
+ About1: TMenuItem;
+ Preferences1: TMenuItem;
+ SaveDialog1: TSaveDialog;
+ ToolBar1: TToolBar;
+ btnnuovo: TToolButton;
+ btnapri: TToolButton;
+ btnagg: TToolButton;
+ btndel: TToolButton;
+ btnestrai: TToolButton;
+ btnsalva: TToolButton;
+ btnsig: TToolButton;
+ btnchiave: TToolButton;
+ ToolButton1: TToolButton;
+ View1: TMenuItem;
+ Attributes1: TMenuItem;
+ za0: TMenuItem;
+ za1: TMenuItem;
+ za8: TMenuItem;
+ Hierarchy1: TMenuItem;
+ Style1: TMenuItem;
+ Panel1: TPanel;
+ za2: TMenuItem;
+ za3: TMenuItem;
+ za4: TMenuItem;
+ za5: TMenuItem;
+ za6: TMenuItem;
+ za7: TMenuItem;
+ za9: TMenuItem;
+ za10: TMenuItem;
+ N3: TMenuItem;
+ None1: TMenuItem;
+ All1: TMenuItem;
+ PanelFiles: TPanel;
+ Panel4: TPanel;
+ FileListBox1: TFileListBox;
+ FontDialog1: TFontDialog;
+ Font1: TMenuItem;
+ OpenDialog1: TOpenDialog;
+ CompressionMethodToUse1: TMenuItem;
+ Store1: TMenuItem;
+ Deflate1: TMenuItem;
+ Best1: TMenuItem;
+ DeflationOption1: TMenuItem;
+ Maximum1: TMenuItem;
+ Normal1: TMenuItem;
+ Fast1: TMenuItem;
+ SuperFast1: TMenuItem;
+ ExtractOptions1: TMenuItem;
+ CreateDirs1: TMenuItem;
+ RestorePath1: TMenuItem;
+ Password1: TMenuItem;
+ StoreOptions1: TMenuItem;
+ RemoveDots1: TMenuItem;
+ RecurseTree1: TMenuItem;
+ StripPath1: TMenuItem;
+ AddFiles1: TMenuItem;
+ DeleteFiles1: TMenuItem;
+ ExtractFiles1: TMenuItem;
+ FreshenFiles1: TMenuItem;
+ PopupMenu1: TPopupMenu;
+ Delete1: TMenuItem;
+ Run1: TMenuItem;
+ Move1: TMenuItem;
+ Freshen1: TMenuItem;
+ Extract1: TMenuItem;
+ Confirmations1: TMenuItem;
+ Close1: TMenuItem;
+ Convert1: TMenuItem;
+ N4: TMenuItem;
+ Default1: TMenuItem;
+ FileComment1: TMenuItem;
+ N5: TMenuItem;
+ OS3: TMenuItem;
+ OS4: TMenuItem;
+ OS2: TMenuItem;
+ OS1: TMenuItem;
+ OS6: TMenuItem;
+ OS5: TMenuItem;
+ AbbreviaontheWeb1: TMenuItem;
+ ShowEmptyfolders1: TMenuItem;
+ TempDirectory1: TMenuItem;
+ Logging1: TMenuItem;
+
+ procedure AbMeter1Click(Sender: TObject);
+ procedure AbZipOutline1ArchiveProgress(Sender: TObject; Progress: Byte;
+ var Abort: Boolean);
+ procedure AbZipOutline1Change(Sender: TObject);
+ procedure AbZipOutline1Click(Sender: TObject);
+ procedure AbZipOutline1ConfirmSave(Sender: TObject;
+ var Confirm: Boolean);
+ procedure AbZipOutline1DblClick(Sender: TObject);
+ procedure AbZipOutline1DragDrop(Sender, Source: TObject; X,
+ Y: Integer);
+ procedure AbZipOutline1DragOver(Sender, Source: TObject; X, Y: Integer;
+ State: TDragState; var Accept: Boolean);
+ procedure AbZipOutline1MouseDown(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+ procedure AbZipOutline1Save(Sender: TObject);
+ procedure AbZipOutline1WindowsDrop(Sender: TObject;
+ FileName: string);
+ procedure All1Click(Sender: TObject);
+ procedure Best1Click(Sender: TObject);
+ procedure Confirmations1Click(Sender: TObject);
+ procedure CreateDirs1Click(Sender: TObject);
+ procedure DeleteAllSelectedClick(Sender: TObject);
+ procedure DirectoryEdit1Change(Sender: TObject);
+ procedure Exit1Click(Sender: TObject);
+ procedure FileListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
+ procedure FileListBox1DragOver(Sender, Source: TObject; X, Y: Integer;
+ State: TDragState; var Accept: Boolean);
+ procedure Font1Click(Sender: TObject);
+ procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
+ procedure FormResize(Sender: TObject);
+ procedure Hierarchy1Click(Sender: TObject);
+ procedure MenuItem1Click(Sender: TObject);
+ procedure MenuItem2Click(Sender: TObject);
+ procedure MenuItem7Click(Sender: TObject);
+ procedure MenuItemSelectClick(Sender: TObject);
+ procedure MenuItemSelectDrawItem(Sender: TObject; ACanvas: TCanvas;
+ ARect: TRect; AState: TOwnerDrawState);
+ procedure None1Click(Sender: TObject);
+ procedure OgDaysCode1ChangeCode(Sender: TObject; Code: TCode);
+ procedure OgDaysCode1Checked(Sender: TObject; Status: TCodeStatus);
+ procedure OgDaysCode1GetCode(Sender: TObject; var Code: TCode);
+ procedure OgDaysCode1GetKey(Sender: TObject; var Key: TKey);
+ procedure OgProtectExe1Checked(Sender: TObject; Status: TExeStatus);
+ procedure Open1Click(Sender: TObject);
+ procedure RestorePath1Click(Sender: TObject);
+ procedure Save1Click(Sender: TObject);
+ procedure SpeedButton15Click(Sender: TObject);
+ procedure SpeedButton16Click(Sender: TObject);
+ procedure MenuFileDeselectClick(Sender: TObject);
+ procedure MenuFileDeselectAllClick(Sender: TObject);
+ procedure ExtractAllSelectedClick(Sender: TObject);
+ procedure SpeedButton5Click(Sender: TObject);
+ procedure SpeedButton6Click(Sender: TObject);
+ procedure Splitter1CanOffset(Sender: TObject; var NewOffset: Integer;
+ var Accept: Boolean);
+ procedure StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel;
+ const Rect: TRect);
+ procedure StripPath1Click(Sender: TObject);
+ procedure SuperFast1Click(Sender: TObject);
+ procedure za10Click(Sender: TObject);
+
+ procedure Delete1Click(Sender: TObject);
+ procedure Extract1Click(Sender: TObject);
+ procedure Freshen1Click(Sender: TObject);
+ procedure Move1Click(Sender: TObject);
+ procedure Password1Click(Sender: TObject);
+ procedure AddFiles1Click(Sender: TObject);
+ procedure FreshenFiles1Click(Sender: TObject);
+ procedure SelectBaseDirectory1Click(Sender: TObject);
+ procedure AbZipOutline1ArchiveItemProgress(Sender: TObject;
+ Item: TAbArchiveItem; Progress: Byte; var Abort: Boolean);
+ procedure AbZipOutline1NeedPassword(Sender: TObject;
+ var NewPassword: AnsiString);
+ procedure DeleteFiles1Click(Sender: TObject);
+ procedure ExtractFiles1Click(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure Close1Click(Sender: TObject);
+ procedure AbZipOutline1Load(Sender: TObject);
+ procedure Convert1Click(Sender: TObject);
+ procedure AbZipOutline1ConfirmOverwrite(var Name: string;
+ var Confirm: Boolean);
+ procedure Default1Click(Sender: TObject);
+ procedure Contents1Click(Sender: TObject);
+ procedure About1Click(Sender: TObject);
+ procedure FileListBox1DblClick(Sender: TObject);
+ procedure AbZipOutline1EndDrag(Sender, Target: TObject; X, Y: Integer);
+ procedure FileListBox1MouseDown(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+ procedure FileListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
+ Y: Integer);
+ procedure AbZipOutline1MouseMove(Sender: TObject; Shift: TShiftState;
+ X, Y: Integer);
+ procedure Edit1Exit(Sender: TObject);
+ procedure FormKeyPress(Sender: TObject; var Key: Char);
+ procedure OS5Click(Sender: TObject);
+ procedure AbZipOutline1ConfirmProcessItem(Sender: TObject;
+ Item: TAbArchiveItem; ProcessType: TAbProcessType;
+ var Confirm: Boolean);
+ procedure AbZipOutline1ProcessItemFailure(Sender: TObject;
+ Item: TAbArchiveItem; const ProcessType: TAbProcessType;
+ ErrorClass: TAbErrorClass; ErrorCode: Integer);
+ procedure TempDirectory1Click(Sender: TObject);
+ procedure Logging1Click(Sender: TObject);
+ private
+ { Private declarations }
+ OutlineX, OutlineY, FileX, FileY : Integer;
+ StubName : string;
+ IgnoreDuplicateWarning : Boolean;
+ procedure ReadIniSettings;
+ procedure SaveIniSettings;
+ procedure SetCaption;
+ procedure UpdateMenu;
+ procedure DoConfirm( Sender : TObject; Item : TAbArchiveItem;
+ var Confirm : Boolean; Caption : string );
+ // procedure GetMinMaxInfo( var Msg: TWMGetMinMaxInfo );
+ // message WM_GETMINMAXINFO;
+
+ procedure onExcept(sender: TObject; e: Exception);
+ procedure ShowPanelFiles;
+ procedure HidePanelFiles;
+ public
+ { Public declarations }
+ procedure LayoutOpen( Sender : TObject);
+ var arcname,versioneinuso,codiceserialepersonale:string
+ end;
+
+var
+ Form1: TForm1;
+ appname:string;
+
+implementation
+
+{$R *.frm}
+
+uses
+ AbConst,
+ AbDlgDir,
+ AbDlgPwd,
+ AbZBrows,
+ AbZipTyp,
+ dgAbout,
+ IniFiles,
+ Outline,
+ // ShellAPI,
+ UBaseDlg,
+ UDemoDlg,
+ unit_open,
+ unit_crypt,
+ unit2,
+ fmwriter,
+ fmreader,
+ unit_crea_apri;
+
+procedure TForm1.onExcept(sender: TObject; e: Exception);
+begin
+ showmessage(e.ClassName+' - '+e.Message);
+end;
+
+procedure TForm1.LayoutOpen(Sender: TObject);
+begin
+
+ FileSetAttr(AbZipOutline1.FileName, hidden);
+ AbZipOutline1.Attributes := [];
+ AbZipOutline1.Update;
+ panel5.Hide;
+
+(*
+ DeleteAllSelected.Enabled:=true;
+ MenuFileDeselectAll.Enabled:=true;
+ speedbutton8.Enabled:=true;
+ speedbutton9.Enabled:=true;
+ speedbutton10.Enabled:=true;
+ speedbutton11.Enabled:=true;
+ speedbutton12.Enabled:=true;
+*)
+ btnsalva.Enabled:=true;
+ btnsig.Enabled:=true;
+ btnagg.Enabled:=true;
+ btndel.Enabled:=true;
+ btnestrai.Enabled:=true;
+
+ PanelMain.Align:=alClient;
+ PanelMain.Show;
+end;
+
+procedure TForm1.All1Click(Sender: TObject);
+var
+ i : Integer;
+begin
+ for i := 0 to Ord( High( TAbZipAttribute ) ) do
+ Attributes1.Items[i].Checked := True;
+ AbZipOutline1.Attributes := [zaCompressedSize, zaCompressionMethod,
+ zaCompressionRatio, zaCRC, zaExternalFileAttributes,
+ zaInternalFileAttributes, zaEncryption, zaTimeStamp,
+ zaUncompressedSize, zaVersionMade, zaVersionNeeded,
+ zaComment];
+ AbZipOutline1.Update;
+end;
+
+procedure TForm1.Exit1Click(Sender: TObject);
+begin
+// Close;
+
+ //showmessage('arcname = '+arcname);
+
+ if arcname <> '' then begin
+ Form1.Close1Click(Sender);
+ end;
+ application.terminate;
+end;
+
+procedure TForm1.FormCreate(Sender: TObject);
+var
+ FileVerInfo: TFileVersionInfo;
+begin
+ codiceserialepersonale:='000000';
+ application.onException := onExcept;
+
+ appname:='DataLock';
+
+// img_nosd.show;
+// img_sd.hide;
+
+imagelist1.GetBitmap(8,img_sd.Picture.Bitmap);
+
+ panel5.Align:=alClient;
+ // panel5.Caption:=appname;
+ panel5.Show;
+
+ ReadIniSettings;
+ SetCaption;
+ UpdateMenu;
+ (*
+ if ParamCount > 0 then
+ try
+ AbZipOutline1.FileName := ParamStr( 1 );
+ except
+ end;
+*)
+
+ FileVerInfo:=TFileVersionInfo.Create(nil);
+ try
+ FileVerInfo.FileName:=paramstr(0);
+ FileVerInfo.ReadFileInfo;
+ (*
+ showmessage('Company: '+FileVerInfo.VersionStrings.Values['CompanyName']);
+ showmessage('File description: '+FileVerInfo.VersionStrings.Values['FileDescription']);
+ showmessage('File version: '+FileVerInfo.VersionStrings.Values['FileVersion']);
+ showmessage('Internal name: '+FileVerInfo.VersionStrings.Values['InternalName']);
+ showmessage('Legal copyright: '+FileVerInfo.VersionStrings.Values['LegalCopyright']);
+ showmessage('Original filename: '+FileVerInfo.VersionStrings.Values['OriginalFilename']);
+ showmessage('Product name: '+FileVerInfo.VersionStrings.Values['ProductName']);
+ showmessage('Product version: '+FileVerInfo.VersionStrings.Values['ProductVersion']);
+ *)
+ versioneinuso:=FileVerInfo.VersionStrings.Values['FileVersion'];
+
+
+ finally
+ FileVerInfo.Free;
+ appname:=appname + ' - v.'+versioneinuso;
+ caption:= appname
+ end;
+
+ OgDaysCode1.AutoCheck:=true;
+ OgDaysCode1.AutoDecrease:=true;
+
+
+end;
+
+procedure TForm1.FormDropFiles(Sender: TObject; const FileNames: array of String
+ );
+var
+ i: Integer;
+
+begin
+// showmessage(filenames[0]);
+ if AbZipOutline1.FileName='' then begin
+
+ SpeedButton16Click(Sender);
+ end;
+
+ for i := Low(FileNames) to High(FileNames) do begin
+
+ if (extractfileext(filenames[i])<>'.sd') and (DirectoryExists(FileNames[i]) = false) then
+ AbZipOutline1.AddFiles( FileNames[i], 0 );
+ (*
+ else
+ showmessage('Non puoi aggiungere altri archivi NK...');
+ continue;
+ *)
+
+
+ if DirectoryExists(FileNames[i]) then begin
+ AbZipOutline1.StoreOptions := AbZipOutline1.StoreOptions + [soRecurse] - [soStripPath];
+ AbZipOutline1.BaseDirectory := FileNames[i];
+ AbZipOutline1.AddFiles( '*.*', 0 );
+ end;
+
+
+ end;
+end;
+
+procedure TForm1.FormResize(Sender: TObject);
+begin
+
+end;
+
+procedure TForm1.Hierarchy1Click(Sender: TObject);
+begin
+ Hierarchy1.Checked := not Hierarchy1.Checked;
+ AbZipOutline1.Hierarchy := Hierarchy1.Checked;
+end;
+
+procedure TForm1.MenuItem1Click(Sender: TObject);
+begin
+ SpeedButton16Click(Sender);
+end;
+
+procedure TForm1.MenuItem2Click(Sender: TObject);
+begin
+ // form_crypt.ShowModal;
+end;
+
+procedure TForm1.MenuItem7Click(Sender: TObject);
+var item:integer;
+begin
+ abzipoutline1.SelectedZipItem.Tagged:=false;
+ item := listboxtagged.Items.IndexOf(abzipoutline1.SelectedZipItem.FileName);
+ if item >= 0 then listboxtagged.Items.Delete(item);
+end;
+
+procedure TForm1.ShowPanelFiles;
+begin
+ PanelMain.Align:=alLeft;
+ PanelMoveFiles.Show;
+ Splitter1.Show;
+ PanelFiles.Show;
+end;
+
+procedure TForm1.HidePanelFiles;
+begin
+ PanelMain.Align:=alClient;
+ PanelMoveFiles.Hide;
+ Splitter1.Hide;
+ PanelFiles.Hide;
+end;
+
+
+procedure TForm1.MenuItemSelectClick(Sender: TObject);
+begin
+ abzipoutline1.SelectedZipItem.Tagged := True;
+ //showmessage(inttostr(listboxtagged.Items.IndexOf(abzipoutline1.SelectedZipItem.FileName)));
+ if listboxtagged.Items.IndexOf(abzipoutline1.SelectedZipItem.FileName) < 0 then
+ listboxtagged.Items.Add(abzipoutline1.SelectedZipItem.FileName);
+ ShowPanelFiles;
+ //showmessage(abzipoutline1.SelectedZipItem.FileName+', selected');
+end;
+
+procedure TForm1.MenuItemSelectDrawItem(Sender: TObject; ACanvas: TCanvas;
+ ARect: TRect; AState: TOwnerDrawState);
+begin
+
+end;
+
+procedure TForm1.None1Click(Sender: TObject);
+var
+ i : Integer;
+begin
+ for i := 0 to pred( Attributes1.Count ) do
+ Attributes1.Items[i].Checked := False;
+ AbZipOutline1.Attributes := [];
+ AbZipOutline1.Update;
+end;
+
+procedure TForm1.OgDaysCode1ChangeCode(Sender: TObject; Code: TCode);
+var
+ Ini : TIniFile;
+ S : string;
+begin
+ (*
+ Ini := TIniFile.Create('ONGUARD.INI');
+ try
+ {store the days code in the ini file}
+ S := BufferToHex(Code, SizeOf(Code));
+ Ini.WriteString('Codes', 'DaysCode', S);
+ //CodeLbl.Caption := S;
+
+ {tell the code component to test the new code, reporting the results}
+ OgDaysCode1.CheckCode(True);
+ finally
+ Ini.Free;
+ end;
+ *)
+end;
+
+procedure TForm1.OgDaysCode1Checked(Sender: TObject; Status: TCodeStatus);
+var
+ S : string;
+begin
+
+ case Status of
+ ogValidCode : S := 'Registrato - Giorni rimanenti: ' + IntToStr(OgDaysCode1.GetValue);
+ ogInvalidCode : S := 'Registrazione non valida';
+ ogPastEndDate : S := 'Registrazione scaduta';
+ ogDayCountUsed : S := 'Zero giorni di uso rimanenti';
+ ogRunCountUsed : S := 'Numero di esecuzioni superato';
+ ogNetCountUsed : S := 'Numero di accessi rete superato';
+ ogCodeExpired : S := 'Registrazione scaduta';
+ else
+ S := 'Errore di registrazione';
+ end;
+ StatusLbl.Caption := S;
+// OgDaysCode1.Decrease;
+end;
+
+procedure TForm1.OgDaysCode1GetCode(Sender: TObject; var Code: TCode);
+var
+ Ini : TIniFile;
+ S : string;
+begin
+ (*
+ Ini := TIniFile.Create('ONGUARD.INI');
+ try
+ {get the days code from the ini file}
+ S := Ini.ReadString('Codes', 'DaysCode', '');
+ {convert to proper form}
+ HexToBuffer(S, Code, SizeOf(Code));
+ {set code label caption}
+// CodeLbl.Caption := S;
+ finally
+ Ini.Free;
+ end;
+ *)
+ S := ReaderForm.editcodregistraz.Text;
+ HexToBuffer(S, Code, SizeOf(Code));
+end;
+
+procedure TForm1.OgDaysCode1GetKey(Sender: TObject; var Key: TKey);
+const
+ {this applications' key}
+ CKey : TKey = ($E5,$8F,$84,$D6,$92,$C9,$A4,$D8,$1A,$FA,$6F,$8D,$AB,$FC,$DF,$B4);
+begin
+ Key := CKey;
+
+end;
+
+procedure TForm1.OgProtectExe1Checked(Sender: TObject; Status: TExeStatus);
+var
+ S : string;
+begin
+ case Status of
+ exeSuccess : S := 'EXE file is OK';
+ exeSizeError : S := 'EXE file size has changed';
+ exeIntegrityError : S := 'EXE Integrity Error';
+ exeNotStamped : S := 'EXE file is not stamped';
+ else
+ S := 'Unknown error';
+ end;
+ StatusLbl.Caption := S;
+
+end;
+
+procedure TForm1.Save1Click(Sender: TObject);
+begin
+ AbZipOutline1.Password:=form_crypt.KeyStr+codiceserialepersonale;
+ AbZipOutline1.Save;
+end;
+
+procedure TForm1.SpeedButton15Click(Sender: TObject);
+begin
+ PanelFiles.Visible:= not PanelFiles.Visible;
+end;
+
+procedure TForm1.SpeedButton16Click(Sender: TObject);
+begin
+ if arcname <> '' then begin
+ showmessage('Sign the folder before opening a new one...');
+ exit;
+ end;
+ (*
+ if savedialog1.Execute then begin
+ AbZipOutline1.BaseDirectory:=extractfilepath(savedialog1.filename);
+ AbZipOutline1.Password:=form_crypt.KeyStr+codiceserialepersonale;
+ AbZipOutline1.FileName:=savedialog1.FileName;
+ arcname:=savedialog1.FileName;
+ LayoutOpen(sender);
+ end;
+ *)
+ if form_creaapri.ShowModal = mrOk then begin
+ AbZipOutline1.BaseDirectory:=extractfilepath(form_creaapri.FileNameEdit1.FileName);
+ codiceserialepersonale:=form_creaapri.editserialepersonale.Text;
+ AbZipOutline1.Password:=form_crypt.KeyStr+codiceserialepersonale;
+ //showmessage('keycrypt '+form_crypt.KeyStr+' codserialepersonale '+codiceserialepersonale);
+ AbZipOutline1.FileName:=form_creaapri.FileNameEdit1.FileName;
+ arcname:=form_creaapri.FileNameEdit1.FileName;
+ LayoutOpen(sender);
+ end;
+
+end;
+
+procedure TForm1.MenuFileDeselectClick(Sender: TObject);
+var item:integer;
+ abitem:tabarchiveitem;
+begin
+ abzipoutline1.SelectedZipItem.Tagged:=false;
+ showmessage(listboxtagged.Items[listboxtagged.ItemIndex]);
+
+ abitem:=Tabarchiveitem.Create;
+ abitem.FileName:=listboxtagged.Items[listboxtagged.ItemIndex];
+ item := abzipoutline1.FindItem(abitem);
+ if item >= 0 then begin
+ abzipoutline1.Items[item].Tagged := False;
+ showmessage('da listbox '+listboxtagged.Items[listboxtagged.ItemIndex]);
+ showmessage('da zip '+abzipoutline1.Items[item].FileName);
+ showmessage('deselezionato, elimino da listboxtagged '+ listboxtagged.Items[listboxtagged.ItemIndex]);
+ listboxtagged.DeleteSelected;
+
+ end;
+ ShowPanelFiles;
+end;
+
+procedure TForm1.MenuFileDeselectAllClick(Sender: TObject);
+var nitem, item:integer;
+begin
+ for nitem:=0 to listboxtagged.Count-1 do begin
+ item := abzipoutline1.FindFile(listboxtagged.Items[0]);
+ if item >= 0 then begin
+ abzipoutline1.Items[item].Tagged := False;
+ listboxtagged.items.Delete(0);
+ end;
+ end;
+ abzipoutline1.ClearTags;
+end;
+
+procedure TForm1.ExtractAllSelectedClick(Sender: TObject);
+begin
+// if AbZipOutline1.SelectedZipItem <> nil then begin
+ if listboxtagged.Items.Count > 0 then begin
+ BaseDirDlg := TBaseDirDlg.Create( Application );
+ try
+ with BaseDirDlg, AbZipOutline1 do begin
+ BaseDirDlg.Caption := 'Extract Selected Files';
+ directoryEdit1.Text := BaseDirectory;
+ directoryEdit1.Enabled := true;
+ label1.Caption := 'Target Directory:';
+ CheckBox1.Caption := 'Restore Path';
+ CheckBox1.Checked := eoRestorePath in ExtractOptions;
+ CheckBox2.Caption := 'Create Directories';
+ CheckBox2.Checked := eoCreateDirs in ExtractOptions;
+ ShowModal;
+ if ModalResult = mrOK then begin
+ BaseDirectory := directoryedit1.directory;
+ if CheckBox1.Checked then
+ ExtractOptions := ExtractOptions + [eoRestorePath]
+ else
+ ExtractOptions := ExtractOptions - [eoRestorePath];
+ if CheckBox2.Checked then
+ ExtractOptions := ExtractOptions + [eoCreateDirs]
+ else
+ ExtractOptions := ExtractOptions - [eoCreateDirs];
+ //ClearTags;
+ //SelectedZipItem.Tagged := True;
+ try
+ ExtractTaggedItems;
+ finally
+ ClearTags;
+ end;
+ FileListBox1.Update;
+ end;
+ end;
+ finally
+ BaseDirDlg.Free;
+ end;
+ end else showmessage('No file selected');
+end;
+
+procedure TForm1.SpeedButton5Click(Sender: TObject);
+begin
+ if panelfiles.Visible then HidePanelFiles else ShowPanelFiles;
+end;
+
+procedure TForm1.SpeedButton6Click(Sender: TObject);
+begin
+ // form_crypt.show;
+end;
+
+procedure TForm1.Splitter1CanOffset(Sender: TObject; var NewOffset: Integer;
+ var Accept: Boolean);
+begin
+
+end;
+
+procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar;
+ Panel: TStatusPanel; const Rect: TRect);
+begin
+ if Panel = StatusBar.Panels[1] then
+ with abmeter1 do begin
+ Top := Rect.Top;
+ Left := Rect.Left;
+ Width := Rect.Right - Rect.Left - 15;
+ Height := Rect.Bottom - Rect.Top;
+ end;
+end;
+
+procedure TForm1.SetCaption;
+begin
+
+ if AbZipOutline1.FileName <> '' then
+ Caption := appname + ' - ' +
+ AbZipOutline1.FileName
+ else
+ Caption:=appname;
+end;
+
+procedure TForm1.UpdateMenu;
+var
+ i : TAbZipAttribute;
+begin
+ with AbZipOutline1 do begin
+ i := Low( TAbZipAttribute );
+ while i <> High( TAbZipAttribute ) do begin
+ Attributes1.Items[Ord(i)].Checked := i in Attributes;
+ i := succ( i );
+ end;
+ Hierarchy1.Checked := Hierarchy;
+// OS1.Checked := Ord( OutlineStyle ) = 0;
+// OS2.Checked := Ord( OutlineStyle ) = 1;
+// OS3.Checked := Ord( OutlineStyle ) = 2;
+// OS4.Checked := Ord( OutlineStyle ) = 3;
+// OS5.Checked := Ord( OutlineStyle ) = 4;
+// OS6.Checked := Ord( OutlineStyle ) = 5;
+
+ Best1.Checked := CompressionMethodToUse = smBestMethod;
+ Deflate1.Checked := CompressionMethodToUse = smDeflated;
+ Store1.Checked := CompressionMethodToUse = smStored;
+ {deflation options}
+ Normal1.Checked := DeflationOption = doNormal;
+ Maximum1.Checked := DeflationOption = doMaximum;
+ Fast1.Checked := DeflationOption = doFast;
+ SuperFast1.Checked := DeflationOption = doSuperFast;
+ {extractOptions}
+ CreateDirs1.Checked := eoCreateDirs in ExtractOptions;
+ RestorePath1.Checked := eoRestorePath in ExtractOptions;
+ {StoreOptions}
+ RecurseTree1.Checked := soRecurse in StoreOptions;
+ StripPath1.Checked := soStripPath in StoreOptions;
+ RemoveDots1.Checked := soRemoveDots in StoreOptions;
+ end;
+end;
+
+procedure TForm1.za10Click(Sender: TObject);
+var
+ Item : TMenuItem;
+begin
+ Item := (Sender as TMenuItem);
+ Item.Checked := not Item.Checked;
+ with AbZipOutline1 do
+ if Item.Checked then
+ Attributes := Attributes + [TAbZipAttribute( Item.Tag )]
+ else
+ Attributes := Attributes - [TAbZipAttribute( Item.Tag )];
+ AbZipOutline1.Update;
+end;
+
+procedure TForm1.Font1Click(Sender: TObject);
+begin
+ if FontDialog1.Execute then
+ with FontDialog1 do begin
+ AbZipOutline1.Font := Font;
+ // DirectoryListBox1.Font := Font;
+ FileListBox1.Font := Font;
+ // DriveComboBox1.Font := Font;
+ // FilterComboBox1.Font := Font;
+ end;
+end;
+
+procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
+begin
+
+ if abzipoutline1.FileName <> '' then begin
+ //showmessage('Sigillo l''archivio prima di chiudere...');
+ Close1Click(Sender);
+ end;
+end;
+
+procedure TForm1.Open1Click(Sender: TObject);
+var f:string;
+begin
+ (*
+ if OpenDialog1.Execute then begin
+ AbZipOutline1.FileName := OpenDialog1.FileName;
+ FileSetAttr(OpenDialog1.FileName, hidden);
+ AbZipOutline1.Attributes := [];
+ AbZipOutline1.Update;
+ panel5.Hide;
+
+ PanelMain.Align:=alClient;
+ PanelMain.Show;
+ end;
+ *)
+
+// Close1Click(Sender);
+ (*
+ form_open.Parent:=panel5;
+ form_open.Align:=alClient;
+ form_open.Show;
+ *)
+(*
+ form2.Parent:=panel5;
+ form2.Align:=alClient;
+ form2.Show;
+*)
+
+
+
+ if arcname <> '' then begin
+ showmessage('Sign the folder before opening a new one...');
+ exit;
+ end;
+
+ if opendialog1.Execute then begin
+// if form_creaapri.ShowModal=mrOk then begin
+ form1.AbZipOutline1.CloseArchive;
+
+ arcname:=opendialog1.FileName;
+
+ ReaderForm.cReaderFile:=opendialog1.FileName;
+ // ReaderForm.cReaderFile:=form_creaapri.FileNameEdit1.Text;
+ ReaderForm.Button1Click(sender);
+ //ReaderForm.Button2Click(sender);
+ //showmessage(ReaderForm.memData.Text);
+
+// img_nosd.show;
+// img_sd.hide;
+
+ imagelist1.GetBitmap(8,img_sd.Picture.Bitmap);
+
+
+ if ReaderForm.memData.Lines.Count>0 then begin
+ if ReaderForm.memData.Lines[0] = 'DataLck' then begin
+ //showmessage('Cartella con sigillo DataLock');
+
+// img_nosd.hide;
+// img_sd.show;
+
+ imagelist1.GetBitmap(10,img_sd.Picture.Bitmap);
+
+// showmessage('Rimuovo il sigillo Datalck prima di decifrarlo');
+
+ //verifico se il codiceseriale del sigillo è quello di default
+
+ //showmessage('cod serial'+ReaderForm.editcodserial.Text);
+
+ //showmessage('Codice personale richiesto');
+ if ReaderForm.editcodserial.Text <> codiceserialepersonale then
+ InputQuery('Codice personale del file', '', TRUE, codiceserialepersonale);
+
+ if codiceserialepersonale <> ReaderForm.editcodserial.Text then
+ begin
+ showmessage('Codice Personale del File non valido!');
+ arcname:='';
+ imagelist1.GetBitmap(8,img_sd.Picture.Bitmap);
+ exit;
+ end;
+
+
+
+
+ //exit;
+
+ form1.arcname:=opendialog1.FileName;
+
+ WriterForm.cReaderFile:=opendialog1.FileName;
+ WriterForm.btnDeleteClick(sender);
+
+ form_crypt.boxInputFile.FileName:=form1.arcname;
+ form_crypt.boxOutputFile.FileName:=form1.arcname+'x';
+// showmessage('main form key crypt '+form_crypt.KeyStr);
+ form_crypt.btnDecryptClick(sender);
+
+
+ if fileexists(form_crypt.boxOutputFile.FileName) then begin
+ deletefile(form_crypt.boxInputFile.FileName);
+ renamefile(form_crypt.boxOutputFile.FileName, form_crypt.boxInputFile.FileName);
+ end;
+ end;
+
+ end
+ else begin
+ showmessage('Cartella priva del sigillo DataLock, nessuna garanzia di recupero dei dati');
+ showmessage('Si consiglia di apporre sigillo DataLock sempre quando si chiude una cartella');
+
+ end;
+
+ form1.AbZipOutline1.BaseDirectory:=extractfilepath(opendialog1.FileName);
+ try
+ AbZipOutline1.FileName:=opendialog1.FileName;
+ AbZipOutline1.Password:=form_crypt.KeyStr+codiceserialepersonale;
+
+ except
+ showmessage('Sigillo non riconosciuto, non è detto che sia possibile recuperare i dati.');
+ end;
+// form1.AbZipOutline1.Password:='123456';
+// showmessage('Password della cartella: '+form1.AbZipOutline1.Password);;
+
+// showmessage(filelistbox1.FileName);
+ form1.LayoutOpen(sender);
+// showmessage('qui');
+ end;
+end;
+
+procedure TForm1.AbZipOutline1DragOver(Sender, Source: TObject; X,
+ Y: Integer; State: TDragState; var Accept: Boolean);
+begin
+ Accept := Source is TFileListBox;
+end;
+
+procedure TForm1.AbZipOutline1DragDrop(Sender, Source: TObject; X,
+ Y: Integer);
+var
+ i, j : Integer;
+ ZB : TAbZipBrowser;
+ IsZip : Boolean;
+ ZipName : string;
+begin
+ if Source is TFileListBox then
+ with (Source as TFileListBox ) do
+ if SelCount = 1 then begin
+ for i := 0 to pred( Items.Count ) do
+ if FileListBox1.Selected[i] then begin
+ IsZip := False;
+ ZB := TAbZipBrowser.Create( Self );
+ try
+ try
+// ZB.ArchiveType:=atZip;
+ ZB.FileName := Directory + '\' + Items[i];
+ IsZip := True;
+ except
+ // showmessage('non è uno zip');
+ end;
+ finally
+ ZB.Free;
+ end;
+ if IsZip then
+ {only one file, and it is a zip file}
+ AbZipOutline1.FileName := Directory + '\' + Items[i]
+ else if AbZipOutline1.FileName <> '' then
+ {only one file, and it's not a zip file}
+ AbZipOutline1.AddFiles( Directory + '\' + Items[i], 0 )
+ else begin
+ if OpenDialog1.Execute then begin
+ AbZipOutline1.FileName := OpenDialog1.FileName;
+ AbZipOutline1.AddFiles( Directory + '\' + Items[i], 0 );
+ end;
+ end;
+ break;
+ end;
+ end
+ else begin
+ {multiple files dropped...}
+ IsZip := False;
+ ZB := TAbZipBrowser.Create( Self );
+ try
+ for i := 0 to pred( Items.Count ) do
+ if FileListBox1.Selected[i] then begin
+ try
+ ZB.FileName := Directory + '\' + Items[i];
+ IsZip := True;
+ ZipName := ZB.FileName;
+ break;
+ except
+ end;
+ end;
+ finally
+ ZB.Free;
+ end;
+ if IsZip and ( Application.MessageBox(
+ 'One of the dropped files is a Zip Archive. Open it?',
+ 'Open or Add Files?',
+ MB_YESNO ) = IDYES ) then
+ AbZipOutline1.FileName := ZipName
+ else begin
+ if AbZipOutline1.FileName <> '' then begin
+ for i := 0 to pred( Items.Count ) do
+ if FileListBox1.Selected[i] then
+ AbZipOutline1.AddFiles( Directory + '\' + Items[i], 0 );
+ end
+ else begin
+ if OpenDialog1.Execute then begin
+ AbZipOutline1.FileName := OpenDialog1.FileName;
+ for j := 0 to pred( Items.Count ) do
+ if FileListBox1.Selected[j] then
+ AbZipOutline1.AddFiles( Directory + '\' + Items[j], 0 )
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure TForm1.AbZipOutline1DblClick(Sender: TObject);
+(*
+var
+ Restoring : Boolean;
+ zFileName : array[0..79] of Char;
+ TempDir, SaveDir : string;
+ TempPath : array [0..255] of Char;
+ TempName : string;
+ *)
+begin
+
+
+
+
+ (*
+ //GetTempPath( sizeof( TempPath ), TempPath );
+// SaveDir := StrPas( TempPath );
+ SaveDir := extractfilepath(application.ExeName);
+ if SaveDir[Length(SaveDir)] = '\' then
+ Delete( SaveDir, Length(SaveDir), 1 );
+ StrPCopy( TempPath, SaveDir );
+
+ with AbZipOutline1 do begin
+ if SelectedZipItem <> nil then begin
+ TempDir := BaseDirectory;
+ Restoring := eoRestorePath in ExtractOptions;
+ ExtractOptions := ExtractOptions - [eoRestorePath];
+ BaseDirectory := SaveDir;
+ try
+ ExtractFiles( SelectedZipItem.FileName );
+ TempName := SelectedZipItem.FileName;
+// AbUnfixName( TempName OpenDocument(StrPCopy( zFileName, ExtractFileName( TempName ) ));SHOWNORMAL );
+ finally
+ BaseDirectory := TempDir;
+ if Restoring then
+ ExtractOptions := ExtractOptions + [eoRestorePath];
+ end;
+ end;
+ end;
+ *)
+end;
+
+procedure TForm1.AbZipOutline1MouseDown(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+ i : Integer;
+ PS, PC : TPoint;
+begin
+(*
+ if Button = mbLeft then begin
+ OutlineX := X;
+ OutlineY := Y;
+ end
+ else
+ *)
+ if Button = mbRight then begin
+ {enable appropriate popup menu items.}
+ {prepare popup menu}
+ (*
+ if AbZipOutline1.Count > 0 then begin
+ {there are items in the outline - select the item under the mouse}
+ i := AbZipOutline1.GetOutlineItem( X, Y );
+ if i <> -1 then
+ AbZipOutline1.SelectedItem := i;
+ end;
+ *)
+ if AbZipOutline1.SelectedZipItem <> nil then begin
+ PC.X := X;
+ PC.Y := Y;
+ PS := AbZipOutline1.ClientToScreen( PC );
+ AbZipOutline1.PopupMenu.Popup( PS.X, PS.Y );
+ end;
+ end;
+
+end;
+
+procedure TForm1.AbZipOutline1Save(Sender: TObject);
+begin
+
+end;
+
+procedure TForm1.FileListBox1DragOver(Sender, Source: TObject; X,
+ Y: Integer; State: TDragState; var Accept: Boolean);
+begin
+ Accept := Source is TAbZipOutline;
+end;
+
+procedure TForm1.FileListBox1DragDrop(Sender, Source: TObject; X,
+ Y: Integer);
+var
+ TempDir : string;
+begin
+ if Source is TAbZipOutline then
+ with (Source as TAbZipOutline ) do begin
+ TempDir := BaseDirectory;
+ BaseDirectory := FileListBox1.Directory;
+ try
+ ExtractFiles( SelectedZipItem.FileName );
+ FileListBox1.Update;
+ finally
+ BaseDirectory := TempDir;
+ end;
+ end;
+end;
+
+procedure TForm1.AbZipOutline1WindowsDrop(Sender: TObject;
+ FileName: string);
+var
+ ZB : TAbZipBrowser;
+ IsZip : Boolean;
+begin
+ IsZip := False;
+ ZB := TAbZipBrowser.Create( Self );
+ try
+ try
+ ZB.FileName := FileName;
+ IsZip := True;
+ except
+ end;
+ finally
+ ZB.Free;
+ end;
+
+ if IsZip and ( AbZipOutline1.FileName = '' ) then
+ AbZipOutline1.FileName := FileName
+ else if AbZipOutline1.FileName = '' then begin
+ if OpenDialog1.Execute then begin
+ AbZipOutline1.FileName := OpenDialog1.FileName;
+ AbZipOutline1.AddFiles( FileName, 0 );
+ end;
+ end
+ else begin
+ {This is a Zip file, but there's already an open archive}
+ if Application.MessageBox( 'Open this file as an archive?',
+ 'Open or Add File', MB_YESNO ) = IDYES then
+ AbZipOutline1.FileName := FileName
+ else
+ AbZipOutline1.AddFiles( FileName, 0 );
+ end;
+end;
+
+procedure TForm1.Best1Click(Sender: TObject);
+var
+ Item : TMenuItem;
+begin
+ Store1.Checked := False;
+ Deflate1.Checked := False;
+ Best1.Checked := False;
+ Item := (Sender as TMenuItem);
+ Item.Checked := True;
+ AbZipOutline1.CompressionMethodToUse := TAbZipSupportedMethod( Item.Tag );
+end;
+
+procedure TForm1.SuperFast1Click(Sender: TObject);
+var
+ Item : TMenuItem;
+begin
+ Normal1.Checked := False;
+ Maximum1.Checked := False;
+ Fast1.Checked := False;
+ SuperFast1.Checked := False;
+ Item := (Sender as TMenuItem);
+ Item.Checked := True;
+ AbZipOutline1.DeflationOption := TAbZipDeflationOption( Item.Tag );
+end;
+
+procedure TForm1.CreateDirs1Click(Sender: TObject);
+var
+ Item : TMenuItem;
+begin
+ Item := Sender as TMenuItem;
+ Item.Checked := not Item.Checked;
+ if Item.Checked then
+ AbZipOutline1.ExtractOptions := AbZipOutline1.ExtractOptions +
+ [eoCreateDirs]
+ else
+ AbZipOutline1.ExtractOptions := AbZipOutline1.ExtractOptions -
+ [eoCreateDirs];
+end;
+
+procedure TForm1.DeleteAllSelectedClick(Sender: TObject);
+var nitem:integer;
+begin
+ if listboxtagged.Items.Count > 0 then begin
+ abzipoutline1.DeleteTaggedItems;
+ for nitem:=0 to listboxtagged.Count-1 do listboxtagged.items.Delete(0);
+ end else showmessage('No file selected');
+end;
+
+procedure TForm1.DirectoryEdit1Change(Sender: TObject);
+begin
+ Edit1Exit(Sender);
+end;
+
+procedure TForm1.RestorePath1Click(Sender: TObject);
+var
+ Item : TMenuItem;
+begin
+ Item := Sender as TMenuItem;
+ Item.Checked := not Item.Checked;
+ if Item.Checked then
+ AbZipOutline1.ExtractOptions := AbZipOutline1.ExtractOptions +
+ [eoRestorePath]
+ else
+ AbZipOutline1.ExtractOptions := AbZipOutline1.ExtractOptions -
+ [eoRestorePath];
+end;
+
+procedure TForm1.StripPath1Click(Sender: TObject);
+var
+ Item : TMenuItem;
+begin
+ Item := Sender as TMenuItem;
+ Item.Checked := not Item.Checked;
+ if Item.Checked then
+ AbZipOutline1.StoreOptions := AbZipOutline1.StoreOptions +
+ [TAbStoreOption(Item.Tag)]
+ else
+ AbZipOutline1.StoreOptions := AbZipOutline1.StoreOptions -
+ [TAbStoreOption(Item.Tag)];
+end;
+
+procedure TForm1.AbZipOutline1Change(Sender: TObject);
+begin
+ (*
+ if AbZipOutline1.FileName <> '' then
+ ArchiveLabel.Caption := Format( 'Archive %s contains %d items.',
+ [AbZipOutline1.FileName, AbZipOutline1.Count] )
+ else
+ ArchiveLabel.Caption := 'No Archive Open';
+
+end;
+ *)
+end;
+
+procedure TForm1.AbZipOutline1Click(Sender: TObject);
+begin
+// MenuItemSelect.Checked:=AbZipOutline1.SelectedZipItem.Tagged;
+end;
+
+procedure TForm1.AbMeter1Click(Sender: TObject);
+begin
+
+end;
+
+procedure TForm1.AbZipOutline1ArchiveProgress(Sender: TObject; Progress: Byte;
+ var Abort: Boolean);
+begin
+ abprogressbar1.Position:=Progress;
+ if progress=100 then abprogressbar1.Position:=0;
+end;
+
+procedure TForm1.Confirmations1Click(Sender: TObject);
+begin
+ Confirmations1.Checked := not Confirmations1.Checked;
+ //SpeedButton7.Down := Confirmations1.Checked;
+end;
+
+procedure TForm1.DoConfirm( Sender : TObject; Item : TAbArchiveItem;
+ var Confirm : Boolean; Caption : string );
+var
+ pMessage : array [0..255] of Char;
+ pCaption : array [0..80] of Char;
+begin
+ if Confirmations1.Checked then
+ Confirm := MessageBox( 0,
+ StrPCopy( pMessage,
+ Format( '%s %s?',
+ [Caption, Item.FileName] ) ),
+ StrPCopy( pCaption, 'Confirmation' ),
+ MB_ICONQUESTION or MB_OKCANCEL ) = IDOK;
+end;
+
+procedure TForm1.AbZipOutline1ConfirmSave(Sender: TObject;
+ var Confirm: Boolean);
+var
+ pMessage : array [0..255] of Char;
+ pCaption : array [0..80] of Char;
+begin
+ if Confirmations1.Checked then
+ Confirm := MessageBox( 0,
+ StrPCopy( pMessage,
+ Format( 'Save %s?',
+ [TAbZipOutline(Sender).FileName] ) ),
+ StrPCopy( pCaption, 'Confirmation' ),
+ MB_ICONQUESTION or MB_OKCANCEL ) = IDOK;
+end;
+
+procedure TForm1.Delete1Click(Sender: TObject);
+begin
+ if AbZipOutline1.SelectedZipItem <> nil then
+ with AbZipOutline1 do begin
+ AbZipOutline1.ClearTags;
+ SelectedZipItem.Tagged := True;
+ try
+ DeleteTaggedItems;
+ showmessage('File(s) Deleted');
+ finally
+ ClearTags;
+ end;
+ end;
+end;
+
+procedure TForm1.Extract1Click(Sender: TObject);
+begin
+ if AbZipOutline1.SelectedZipItem <> nil then begin
+ BaseDirDlg := TBaseDirDlg.Create( Application );
+ try
+ with BaseDirDlg, AbZipOutline1 do begin
+ BaseDirDlg.Caption := 'Extract Selected File';
+ directoryEdit1.Text := BaseDirectory;
+ directoryEdit1.Enabled := true;
+ label1.Caption := 'Target Directory:';
+ CheckBox1.Caption := 'Restore Path';
+ CheckBox1.Checked := eoRestorePath in ExtractOptions;
+ CheckBox2.Caption := 'Create Directories';
+ CheckBox2.Checked := eoCreateDirs in ExtractOptions;
+ ShowModal;
+ if ModalResult = mrOK then begin
+ BaseDirectory := directoryedit1.directory;
+ if CheckBox1.Checked then
+ ExtractOptions := ExtractOptions + [eoRestorePath]
+ else
+ ExtractOptions := ExtractOptions - [eoRestorePath];
+ if CheckBox2.Checked then
+ ExtractOptions := ExtractOptions + [eoCreateDirs]
+ else
+ ExtractOptions := ExtractOptions - [eoCreateDirs];
+ //ClearTags;
+ SelectedZipItem.Tagged := True;
+ try
+ ExtractTaggedItems;
+ finally
+ ClearTags;
+ end;
+ FileListBox1.Update;
+ end;
+ end;
+ finally
+ BaseDirDlg.Free;
+ end;
+ end else showmessage('No file selected');
+end;
+
+procedure TForm1.Freshen1Click(Sender: TObject);
+begin
+ (*
+ if AbZipOutline1.SelectedZipItem <> nil then begin
+ BaseDirDlg := TBaseDirDlg.Create( Application );
+ try
+ with BaseDirDlg, AbZipOutline1 do begin
+ Caption := 'Freshen Selected File';
+ directoryEdit1.Text := SelectedZipItem.FileName;
+ directoryEdit1.Enabled := False;
+ Caption := 'Source Directory:';
+ // if BaseDirectory <> '' then
+ // DLB.Directory := BaseDirectory;
+ CheckBox1.Caption := 'Recurse';
+ CheckBox1.Checked := soRecurse in StoreOptions;
+ CheckBox2.Caption := 'Strip Path';
+ CheckBox2.Checked := soStripPath in StoreOptions;
+
+ ShowModal;
+ if ModalResult = mrOK then begin
+ if CheckBox1.Checked then
+ StoreOptions := StoreOptions + [soRecurse]
+ else
+ StoreOptions := StoreOptions - [soRecurse];
+ if CheckBox2.Checked then
+ StoreOptions := StoreOptions + [soStripPath]
+ else
+ StoreOptions := StoreOptions - [soStripPath];
+ BaseDirectory := DirLabel.Caption;
+
+ ClearTags;
+ SelectedZipItem.Tagged := True;
+ try
+ FreshenTaggedItems;
+ finally
+ ClearTags;
+ end;
+ FileListBox1.Update;
+ end;
+ end;
+ finally
+ BaseDirDlg.Free;
+ end;
+ end;
+
+end;
+ *)
+end;
+
+procedure TForm1.Move1Click(Sender: TObject);
+begin
+ DemoDlg := TDemoDlg.Create( Application );
+ try
+ with DemoDlg do begin
+ Caption := 'Move File to New Path';
+ Edit1.Text := AbZipOutline1.SelectedZipItem.FileName;
+ ShowModal;
+ if ModalResult = mrOK then
+ AbZipOutline1.Move( AbZipOutline1.SelectedZipItem, Edit1.Text );
+ end;
+ finally
+ DemoDlg.Free;
+ end;
+end;
+
+procedure TForm1.Password1Click(Sender: TObject);
+var
+ Dlg : TPassWordDlg;
+begin
+ Dlg := TPassWordDlg.Create( Application );
+ try
+ Dlg.Edit1.Text := string(AbZipOutline1.Password);
+ Dlg.ShowModal;
+ if Dlg.ModalResult = mrOK then
+ AbZipOutline1.Password := AnsiString(Dlg.Edit1.Text);
+ finally
+ Dlg.Free;
+ end;
+(*
+ if Length( AbZipOutline1.Password ) > 0 then
+ Image1.Visible := True
+ else
+ Image1.Visible := False;
+*)
+end;
+
+procedure TForm1.AddFiles1Click(Sender: TObject);
+begin
+ BaseDirDlg := TBaseDirDlg.Create( Application );
+ try
+ with BaseDirDlg, AbZipOutline1 do begin
+ BaseDirDlg.caption := 'Add Directory';
+ //directoryEdit1.Text := directoryEdit1.Text+'*.*';
+ label1.Caption := 'Directory Path';
+ CheckBox1.Caption := 'Recursive';
+ CheckBox1.Checked := soRecurse in StoreOptions;
+ CheckBox2.Caption := 'Remove Path';
+ CheckBox2.Checked := soStripPath in StoreOptions;
+
+ //if BaseDirectory <> '' then
+ // DLB.Directory := BaseDirectory;
+
+ ShowModal;
+ if ModalResult = mrOK then begin
+
+ if CheckBox1.Checked then
+ StoreOptions := StoreOptions + [soRecurse]
+ else
+ StoreOptions := StoreOptions - [soRecurse];
+ if CheckBox2.Checked then
+ StoreOptions := StoreOptions + [soStripPath]
+ else
+ StoreOptions := StoreOptions - [soStripPath];
+ BaseDirectory := directoryedit1.Directory;
+ AddFiles( '*.*', 0 );
+ end;
+ end;
+ finally
+ BaseDirDlg.Free;
+ end;
+end;
+
+procedure TForm1.FreshenFiles1Click(Sender: TObject);
+begin
+// BaseDirDlg := TBaseDirDlg.Create( Application );
+// try
+ with BaseDirDlg, AbZipOutline1 do begin
+ BaseDirDlg.Caption := 'Freshen Files';
+ directoryEdit1.Text := '*.*';
+ label1.Caption := 'Source Directory';
+ CheckBox1.Caption := 'Recursive';
+ CheckBox1.Checked := soRecurse in StoreOptions;
+ CheckBox2.Caption := 'Remove Path';
+ CheckBox2.Checked := soStripPath in StoreOptions;
+ //showmessage('vado');
+ //if BaseDirectory <> '' then
+ // DLB.Directory := BaseDirectory;
+
+ ShowModal;
+ if ModalResult = mrOK then begin
+ if CheckBox1.Checked then
+ StoreOptions := StoreOptions + [soRecurse]
+ else
+ StoreOptions := StoreOptions - [soRecurse];
+ if CheckBox2.Checked then
+ StoreOptions := StoreOptions + [soStripPath]
+ else
+ StoreOptions := StoreOptions - [soStripPath];
+ BaseDirectory := directoryedit1.Directory;
+ FreshenFiles( '*.*' );
+ end;
+ end;
+// finally
+// BaseDirDlg.Free;
+// end;
+end;
+
+procedure TForm1.SelectBaseDirectory1Click(Sender: TObject);
+begin
+ {
+ with TAbDirDlg.Create(Self) do begin
+ Caption := 'Directory';
+ AdditionalText := 'Select folder to extract into';
+ if Execute then
+ AbZipOutline1.BaseDirectory := SelectedFolder;
+ Free;
+ end; }
+end;
+
+procedure TForm1.AbZipOutline1ArchiveItemProgress(Sender: TObject;
+ Item: TAbArchiveItem; Progress: Byte; var Abort: Boolean);
+var
+ ActionString : string;
+begin
+ case Item.Action of
+ aaAdd : ActionString := 'Adding ';
+ aaFreshen : ActionString := 'Freshening ';
+ aaDelete : ActionString := 'Deleting ';
+ else
+ ActionString :='Extracting ';
+ end;
+ //label1.caption := ActionString + Item.FileName + ' ';
+ memo1.Lines.Add(ActionString + Item.FileName);
+ if Progress = 100 then begin
+ label1.caption := '';
+ abmeter2.Reset;
+ end;
+end;
+
+procedure TForm1.AbZipOutline1NeedPassword(Sender: TObject;
+ var NewPassword: AnsiString);
+var
+ Dlg : TPassWordDlg;
+begin
+ Dlg := TPassWordDlg.Create( Application );
+ try
+ Dlg.ShowModal;
+ if Dlg.ModalResult = mrOK then
+ NewPassword := AnsiString(Dlg.Edit1.Text);
+ finally
+ Dlg.Free;
+ end;
+
+// if Length( NewPassword ) > 0 then
+// Image1.Visible := True;
+end;
+
+procedure TForm1.DeleteFiles1Click(Sender: TObject);
+begin
+
+ DemoDlg := TDemoDlg.Create( Application );
+ try
+ with DemoDlg do begin
+ Caption := 'Delete Files with FileMask';
+ Edit1.Text := '*.*';
+ ShowModal;
+ if ModalResult = mrOK then
+ AbZipOutline1.DeleteFiles( Edit1.Text );
+ end;
+ finally
+ DemoDlg.Free;
+ end;
+
+ //Delete1Click(Sender);
+end;
+
+procedure TForm1.ExtractFiles1Click(Sender: TObject);
+begin
+ BaseDirDlg := TBaseDirDlg.Create( Application );
+ try
+ with BaseDirDlg, AbZipOutline1 do begin
+ BaseDirDlg.Caption := 'Extract All Files';
+ directoryEdit1.Text := BaseDirectory;
+ label1.Caption := 'Target Directory:';
+ CheckBox1.Caption := 'Restore Path';
+ CheckBox1.Checked := eoRestorePath in ExtractOptions;
+ CheckBox2.Caption := 'Create Directories';
+ CheckBox2.Checked := eoCreateDirs in ExtractOptions;
+ ShowModal;
+ if ModalResult = mrOK then begin
+ BaseDirectory := BaseDirDlg.DirectoryEdit1.Directory;
+ if CheckBox1.Checked then
+ ExtractOptions := ExtractOptions + [eoRestorePath]
+ else
+ ExtractOptions := ExtractOptions - [eoRestorePath];
+ if CheckBox2.Checked then
+ ExtractOptions := ExtractOptions + [eoCreateDirs]
+ else
+ ExtractOptions := ExtractOptions - [eoCreateDirs];
+
+ ExtractFiles( '*.*' );
+ FileListBox1.Update;
+ end;
+ end;
+ finally
+ BaseDirDlg.Free;
+ end;
+end;
+
+procedure TForm1.FormDestroy(Sender: TObject);
+begin
+ AbZipOutline1.Save;
+ SaveIniSettings;
+end;
+
+procedure TForm1.ReadIniSettings;
+var
+ Value : Integer;
+ Exists : Boolean;
+begin
+ with TIniFile.Create( ChangeFileExt( Application.ExeName, '.INI' ) ) do begin
+ try
+ {view menu}
+ Exists := ReadBool( 'General', 'Exists', False );
+ if Exists then begin
+ AbZipOutline1.Attributes := [];
+ if ReadBool( 'View', 'CSize', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaCompressedSize];
+ if ReadBool( 'View', 'CMethod', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaCompressionMethod];
+ if ReadBool( 'View', 'CRatio', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaCompressionRatio];
+ if ReadBool( 'View', 'CRC', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaCRC];
+ if ReadBool( 'View', 'EFA', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaExternalFileAttributes];
+ if ReadBool( 'View', 'IFA', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaInternalFileAttributes];
+ if ReadBool( 'View', 'Encryption', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaEncryption];
+ if ReadBool( 'View', 'TimeStamp', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaTimeStamp];
+ if ReadBool( 'View', 'USize', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaUnCompressedSize];
+ if ReadBool( 'View', 'MadeBy', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaVersionMade];
+ if ReadBool( 'View', 'Needed', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaVersionNeeded];
+ if ReadBool( 'View', 'Comment', False ) then
+ AbZipOutline1.Attributes := AbZipOutline1.Attributes +
+ [zaComment];
+
+ AbZipOutline1.Hierarchy := ReadBool( 'View', 'Hierarchy', True );
+
+// Value := ReadInteger( 'View', 'OutlineStyle', -1 );
+// if Value <> -1 then
+// AbZipOutline1.OutlineStyle := TOutlineStyle( Value );
+ {preferences menu}
+ AbZipOutline1.BaseDirectory := ReadString( 'Preferences',
+ 'BaseDirectory',
+ ExtractFilePath( Application.ExeName ) );
+ if DirectoryExists(AbZipOutline1.BaseDirectory ) then
+ AbZipOutline1.BaseDirectory := ExtractFilePath( Application.ExeName );
+ Confirmations1.Checked := ReadBool( 'Preferences',
+ 'Confirmations', False );
+// SpeedButton7.Down := Confirmations1.Checked;
+ Value := ReadInteger( 'Preferences',
+ 'CompressionMethodToUse',
+ Ord( smBestMethod ) );
+ AbZipOutline1.CompressionMethodToUse := TAbZipSupportedMethod( Value );
+ Value := ReadInteger( 'Preferences', 'DeflationOption', Ord( doNormal));
+ AbZipOutline1.DeflationOption := TAbZipDeflationOption( Value );
+ AbZipOutline1.ExtractOptions := [];
+ if ReadBool( 'Preferences', 'CreateDirs', False ) then
+ AbZipOutline1.ExtractOptions := AbZipOutline1.ExtractOptions +
+ [eoCreateDirs];
+ if ReadBool( 'Preferences', 'RestorePath', False ) then
+ AbZipOutline1.ExtractOptions := AbZipOutline1.ExtractOptions +
+ [eoRestorePath];
+ AbZipOutline1.StoreOptions := [];
+ if ReadBool( 'Preferences', 'StripPath', False ) then
+ AbZipOutline1.StoreOptions := AbZipOutline1.StoreOptions +
+ [soStripPath];
+ if ReadBool( 'Preferences', 'RemoveDots', False ) then
+ AbZipOutline1.StoreOptions := AbZipOutline1.StoreOptions +
+ [soRemoveDots];
+ if ReadBool( 'Preferences', 'Recurse', False ) then
+ AbZipOutline1.StoreOptions := AbZipOutline1.StoreOptions +
+ [soRecurse];
+ StubName := ReadString( 'Self Extracting', 'StubName', 'selfstub.exe' );
+ {FilterComboBox1.Filter := ReadString( 'Navigator', 'Filter',
+ 'All files (*.*)|*.*|Zip Files (*.ZIP)|*.ZIP|' +
+ 'Executable Files (*.EXE)|*.EXE|Text files (*.TXT)|*.TXT|' +
+ 'Pascal files (*.PAS)|*.PAS' ); }
+ end;
+ finally
+ Free;
+ end;
+ end;
+end;
+
+procedure TForm1.SaveIniSettings;
+begin
+ with TIniFile.Create( ChangeFileExt( Application.ExeName, '.INI' ) ) do begin
+ try
+ {view menu}
+ WriteBool( 'General', 'Exists', True );
+ with AbZipOutline1 do begin
+ WriteBool( 'View', 'CSize', zaCompressedSize in Attributes );
+ WriteBool( 'View', 'CMethod', zaCompressionMethod in Attributes );
+ WriteBool( 'View', 'CRatio', zaCompressionRatio in Attributes );
+ WriteBool( 'View', 'CRC', zaCRC in Attributes );
+ WriteBool( 'View', 'EFA', zaExternalFileAttributes in Attributes );
+ WriteBool( 'View', 'IFA', zaInternalFileAttributes in Attributes );
+ WriteBool( 'View', 'Encryption', zaEncryption in Attributes );
+ WriteBool( 'View', 'TimeStamp', zaTimeStamp in Attributes );
+ WriteBool( 'View', 'USize', zaUnCompressedSize in Attributes );
+ WriteBool( 'View', 'MadeBy', zaVersionMade in Attributes );
+ WriteBool( 'View', 'Needed', zaVersionNeeded in Attributes );
+ WriteBool( 'View', 'Comment', zaComment in Attributes );
+
+ WriteBool( 'View', 'Hierarchy', Hierarchy );
+// WriteInteger( 'View', 'OutlineStyle', Ord( OutlineStyle ) );
+ {preferences menu}
+ WriteString( 'Preferences', 'BaseDirectory', BaseDirectory );
+ WriteBool( 'Preferences', 'Confirmations', Confirmations1.Checked );
+ WriteInteger( 'Preferences', 'CompressionMethodToUse',
+ Ord( CompressionMethodToUse ) );
+ WriteInteger( 'Preferences', 'DeflationOption',
+ Ord( DeflationOption ));
+
+ WriteBool( 'Preferences', 'CreateDirs',
+ eoCreateDirs in ExtractOptions );
+ WriteBool( 'Preferences', 'RestorePath',
+ eoRestorePath in ExtractOptions );
+ WriteBool( 'Preferences', 'StripPath', soStripPath in StoreOptions );
+ WriteBool( 'Preferences', 'RemoveDots', soRemoveDots in StoreOptions );
+ WriteBool( 'Preferences', 'Recurse', soRecurse in StoreOptions );
+ end;
+ finally
+ Free;
+ end;
+ end;
+end;
+
+procedure TForm1.Close1Click(Sender: TObject);
+begin
+ form_creaapri.FileNameEdit1.FileName:=arcname;
+ form_creaapri.editserialepersonale.Text:=codiceserialepersonale;
+ //if form_creaapri.ShowModal = mrOk then begin
+ form_creaapri.ShowModal;
+ codiceserialepersonale:=form_creaapri.editserialepersonale.Text;
+ AbZipOutline1.Password:=form_crypt.KeyStr+codiceserialepersonale;
+
+ AbZipOutline1.FileName:=form_creaapri.FileNameEdit1.FileName;
+ arcname:=form_creaapri.FileNameEdit1.FileName;
+ //end; // else exit;
+
+ Save1Click(Sender);
+ AbZipOutline1.CloseArchive;
+ AbZipOutline1.FileName := '';
+ AbZipOutline1.Color := clBtnFace;
+// showmessage(arcname);
+ // showmessage(form_crypt.KeyStr);
+
+ form_crypt.boxInputFile.FileName:=arcname;
+ form_crypt.boxOutputFile.FileName:=arcname+'x';
+ form_crypt.btnEncryptClick(sender);
+ if fileexists(form_crypt.boxOutputFile.FileName) then begin
+ deletefile(form_crypt.boxInputFile.FileName);
+ renamefile(form_crypt.boxOutputFile.FileName, form_crypt.boxInputFile.FileName);
+ end;
+// AbZipOutline1.CloseArchive;
+
+
+
+ WriterForm.cReaderFile:=form_crypt.boxInputFile.FileName;
+// showmessage(WriterForm.cReaderFile);
+
+// form_crypt.strsorg:=form_crypt.KeyStr;
+// form_crypt.btnEncrypt1click(sender); // cripto la chiave
+
+ //WriterForm.btnStoreClick(sender);
+ WriterForm.btnStore1Click(sender);
+
+ (*
+ DeleteAllSelected.Enabled:=false;
+ MenuFileDeselectAll.Enabled:=false;
+ speedbutton8.Enabled:=false;
+ speedbutton9.Enabled:=false;
+ speedbutton10.Enabled:=false;
+ speedbutton11.Enabled:=false;
+ speedbutton12.Enabled:=false;
+*)
+ btnsalva.Enabled:=false;
+ btnsig.Enabled:=false;
+ btnagg.Enabled:=false;
+ btndel.Enabled:=false;
+ btnestrai.Enabled:=false;
+
+ PanelMain.Hide;
+ form_open.Hide;
+ panel5.Show;
+ arcname:='';
+ codiceserialepersonale:='000000';
+
+ imagelist1.GetBitmap(8,img_sd.Picture.Bitmap);
+
+end;
+
+procedure TForm1.AbZipOutline1Load(Sender: TObject);
+begin
+ IgnoreDuplicateWarning := False;
+ AbZipOutline1.Color := clWindow;
+ SetCaption;
+end;
+
+procedure TForm1.Convert1Click(Sender: TObject);
+var
+ ZipName : string;
+ ExeName : string;
+ StubSpec : string;
+ StubStream, ZipStream, SelfExtractingStream : TStream;
+begin
+ AbZipOutline1.Save;
+ExpandFileName(AbZipOutline1.FileName );
+ AbZipOutline1.FileName := '';
+
+ ExeName := ChangeFileExt( arcname, '.exe' );
+ StubSpec := ExtractFilePath( Application.ExeName ) + StubName;
+
+ StubStream := TFileStream.Create( StubSpec, fmOpenRead or fmShareDenyWrite );
+ ZipStream := TFileStream.Create( arcname , fmOpenRead or fmShareDenyWrite );
+ SelfExtractingStream := TFileStream.Create( ExeName,
+ fmCreate or fmShareExclusive );
+ try
+ MakeSelfExtracting( StubStream, ZipStream, SelfExtractingStream );
+ finally
+ SelfExtractingStream.Free;
+ StubStream.Free;
+ ZipStream.Free;
+ end;
+ {and reload...}
+ AbZipOutline1.FileName := ExeName;
+end;
+ {
+procedure TForm1.GetMinMaxInfo( var Msg: TWMGetMinMaxInfo );
+begin
+ with Msg.MinMaxInfo^ do begin
+ ptMinTrackSize := Point( 700, 400 );
+ ptMaxTrackSize := Point( 1600, 1200 );
+ end;
+end; }
+
+procedure TForm1.AbZipOutline1ConfirmOverwrite(var Name: string;
+ var Confirm: Boolean);
+var
+ pMessage : array [0..255] of Char;
+ pCaption : array [0..80] of Char;
+begin
+ Confirm := MessageBox( 0,
+ StrPCopy( pMessage,
+ Format( 'Overwrite %s?',
+ [Name] ) ),
+ StrPCopy( pCaption, 'Confirmation' ),
+ MB_ICONQUESTION or MB_OKCANCEL ) = IDOK;
+end;
+
+procedure TForm1.Default1Click(Sender: TObject);
+var
+ i : Integer;
+begin
+ AbZipOutline1.Attributes := AbDefZipAttributes;
+ for i := 0 to Ord( High( TAbZipAttribute ) ) do
+ Attributes1.Items[i].Checked := TAbZipAttribute(i) in AbDefZipAttributes;
+ AbZipOutline1.Update;
+end;
+
+procedure TForm1.Contents1Click(Sender: TObject);
+begin
+ // Application.HelpCommand(HELP_CONTENTS, 0);
+end;
+
+procedure TForm1.About1Click(Sender: TObject);
+begin
+ dlgAboutBox := TDlgAboutBox.Create( Self );
+ try
+ dlgAboutBox.ShowModal;
+ finally
+ dlgAboutBox.Free;
+ end;
+end;
+
+procedure TForm1.FileListBox1DblClick(Sender: TObject);
+var
+ Browser : TAbZipBrowser;
+ Filename : string;
+ OK : Boolean;
+begin
+ {Filename := IncludeTrailingPathDelimiter(DirectoryListBox1.Directory) +
+ FileListBox1.Items[FileListBox1.ItemIndex]; }
+ if AbZipOutline1.FileName = '' then
+ try
+ AbZipOutline1.FileName := Filename;
+ except
+ AbZipOutline1.FileName := '';
+ end
+ else begin
+ Browser := TAbZipBrowser.Create( Self );
+ OK := True;
+ try
+ try
+ Browser.FileName := Filename;
+ except
+ OK := False;
+ end;
+ finally
+ Browser.Free;
+ end;
+ if OK then
+ AbZipOutline1.FileName := Filename;
+ end;
+end;
+
+procedure TForm1.AbZipOutline1EndDrag(Sender, Target: TObject; X,
+ Y: Integer);
+begin
+ FileListBox1.Update;
+end;
+
+procedure TForm1.FileListBox1MouseDown(Sender: TObject;
+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+ if Button = mbLeft then begin
+ FileX := X;
+ FileY := Y;
+ end;
+end;
+
+procedure TForm1.FileListBox1MouseMove(Sender: TObject; Shift: TShiftState;
+ X, Y: Integer);
+begin
+ if ssLeft in Shift then
+ if ( ( X - FileX ) * ( X - FileX ) +
+ ( Y - FileY ) * ( Y - FileY ) > 100 ) then
+ if FileListBox1.SelCount > 0 then
+ if ( not FileListBox1.Dragging ) then
+ FileListBox1.BeginDrag( True );
+end;
+
+procedure TForm1.AbZipOutline1MouseMove(Sender: TObject;
+ Shift: TShiftState; X, Y: Integer);
+begin
+ if ssLeft in Shift then
+ if ( ( X - OutlineX ) * ( X - OutlineX ) +
+ ( Y - OutlineY ) * ( Y - OutlineY ) > 100 ) then
+ if AbZipOutline1.SelectedZipItem <> nil then
+ if ( not FileListBox1.Dragging ) then
+ AbZipOutline1.BeginDrag( True );
+end;
+
+procedure TForm1.Edit1Exit(Sender: TObject);
+begin
+ FileListBox1.Directory:=directoryEdit1.Text;
+end;
+
+procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
+begin
+ if Key = #13 then
+ Edit1Exit( Self );
+end;
+
+procedure TForm1.OS5Click(Sender: TObject);
+var
+ Item : TMenuItem;
+begin
+ OS1.Checked := False;
+ OS2.Checked := False;
+ OS3.Checked := False;
+ OS4.Checked := False;
+ OS5.Checked := False;
+ OS6.Checked := False;
+
+ Item := (Sender as TMenuItem);
+ Item.Checked := True;
+// AbZipOutline1.OutlineStyle := TOutlineStyle( Item.Tag );
+end;
+
+procedure TForm1.AbZipOutline1ConfirmProcessItem(Sender: TObject;
+ Item: TAbArchiveItem; ProcessType: TAbProcessType;
+ var Confirm: Boolean);
+var
+ Process : string;
+begin
+
+ Confirm := True;
+ case ProcessType of
+ ptAdd : Process := 'Add';
+ ptDelete : Process := 'Delete';
+ ptExtract : Process := 'Extract';
+ ptFreshen : Process := 'Freshen';
+ ptMove : Process := 'Move';
+ end;
+ DoConfirm( Sender, Item, Confirm, Process );
+
+end;
+
+procedure TForm1.AbZipOutline1ProcessItemFailure(Sender: TObject;
+ Item: TAbArchiveItem; const ProcessType: TAbProcessType;
+ ErrorClass: TAbErrorClass; ErrorCode: Integer);
+var
+ S : string;
+ pMessage : array [0..128] of Char;
+begin
+ if ( ErrorClass = ecAbbrevia ) and
+ ( ErrorCode = AbDuplicateName ) then begin
+ if not IgnoreDuplicateWarning then begin
+ if ProcessType = ptAdd then
+ s := 'Cannot add '
+ else
+ s := 'Cannot move ';
+ s := s + Item.FileName +
+ '. Would create a duplicate name. Ignore future warnings?';
+ if (Application.MessageBox( StrPCopy( pMessage, s ), 'Warning',
+ MB_YESNO ) = IDYES ) then
+ IgnoreDuplicateWarning := True;
+ end;
+ Exit;
+ end;
+
+ case ProcessType of
+ ptAdd :
+ ShowMessage( 'Cannot add ' + Item.FileName + ' to ' +
+ TAbZipOutline(Sender).FileName );
+ ptExtract :
+ ShowMessage( 'Cannot extract ' + Item.FileName + ' from ' +
+ TAbZipOutline(Sender).FileName );
+ ptFreshen :
+ ShowMessage( 'Cannot freshen ' + Item.FileName + ' in ' +
+ TAbZipOutline(Sender).FileName );
+ ptMove :
+ ShowMessage( 'Cannot move ' + Item.FileName + ' to ' +
+ TAbZipOutline(Sender).FileName );
+ end;
+ if ErrorClass = ecAbbrevia then
+ ShowMessage( AbStrRes(ErrorCode) );
+end;
+
+
+procedure TForm1.TempDirectory1Click(Sender: TObject);
+begin {
+ with TAbDirDlg.Create(Self) do begin
+ Caption := 'Directory';
+ AdditionalText := 'Select temporary directory';
+ if Execute then
+ AbZipOutline1.TempDirectory := SelectedFolder;
+ Free;
+ end; }
+end;
+
+procedure TForm1.Logging1Click(Sender: TObject);
+var
+ E, F : string;
+begin
+ AbZipOutline1.Logging := False;
+ Logging1.Checked := not Logging1.Checked;
+ if Logging1.Checked then with OpenDialog1 do begin
+ Title := 'Select Text File for Logging';
+ E := DefaultExt;
+ DefaultExt := '';
+ F := Filter;
+ Filter := '';
+ Filename := AbZipOutline1.LogFile;
+ if Execute then begin
+ AbZipOutline1.LogFile := Filename;
+ AbZipOutline1.Logging := True;
+ end;
+ DefaultExt := E;
+ Filter := F;
+ end;
+ Logging1.Checked := AbZipOutline1.Logging;
+end;
+
+end.
diff --git a/UPayload.pas b/UPayload.pas
new file mode 100644
index 0000000..9a2b764
--- /dev/null
+++ b/UPayload.pas
@@ -0,0 +1,182 @@
+unit UPayload;
+
+{$MODE Delphi}
+
+interface
+
+type
+ TPayload = class(TObject)
+ private
+ fFileName: string;
+ fOldFileMode: Integer;
+ fFile: File;
+ procedure Open(Mode: Integer);
+ procedure Close;
+ public
+ constructor Create(const FileName: string);
+ function HasPayload: Boolean;
+ function PayloadSize: Integer;
+ procedure SetPayload(const Data; const DataSize: Integer);
+ procedure GetPayload(var Data);
+ procedure RemovePayload;
+ end;
+
+implementation
+
+uses
+ ActiveX;
+
+type
+ TPayloadFooter = packed record
+ WaterMark: TGUID;
+ ExeSize: LongInt;
+ DataSize: LongInt;
+ end;
+
+const
+ cWaterMarkGUID: TGUID =
+ '{9FABA105-EDA8-45C3-89F4-369315A947EB}';
+ cReadOnlyMode = 0;
+ cReadWriteMode = 2;
+
+procedure InitFooter(out Footer: TPayloadFooter);
+begin
+ FillChar(Footer, SizeOf(Footer), 0);
+ Footer.WaterMark := cWaterMarkGUID;
+end;
+
+function ReadFooter(var F: File;
+ out Footer: TPayloadFooter): Boolean;
+var
+ FileLen: Integer;
+begin
+ // Check that file is large enough for a footer!
+ FileLen := FileSize(F);
+ if FileLen > SizeOf(Footer) then
+ begin
+ // Big enough: move to start of footer and read it
+ Seek(F, FileLen - SizeOf(Footer));
+ BlockRead(F, Footer, SizeOf(Footer));
+ end
+ else
+ // File not large enough for footer: zero it
+ // .. this ensures watermark is invalid
+ FillChar(Footer, SizeOf(Footer), 0);
+ // Return if watermark is valid
+ Result := IsEqualGUID(Footer.WaterMark, cWaterMarkGUID);
+end;
+
+procedure TPayload.Close;
+begin
+ // close file and restores previous file mode
+ CloseFile(fFile);
+ FileMode := fOldFileMode;
+end;
+
+constructor TPayload.Create(const FileName: string);
+begin
+ inherited Create;
+ fFileName := FileName;
+end;
+
+procedure TPayload.GetPayload(var Data);
+var
+ Footer: TPayloadFooter;
+begin
+ // open file as read only
+ Open(cReadOnlyMode);
+ try
+ // read footer
+ if ReadFooter(fFile, Footer)
+ and (Footer.DataSize > 0) then
+ begin
+ // move to end of exe code and read data
+ Seek(fFile, Footer.ExeSize);
+ BlockRead(fFile, Data, Footer.DataSize);
+ end;
+ finally
+ // close file
+ Close;
+ end;
+end;
+
+function TPayload.HasPayload: Boolean;
+begin
+ // we have a payload if size is greater than 0
+ Result := PayloadSize > 0;
+end;
+
+procedure TPayload.Open(Mode: Integer);
+begin
+ // open file with given mode, recording current one
+ fOldFileMode := FileMode;
+ AssignFile(fFile, fFileName);
+ FileMode := Mode;
+ Reset(fFile, 1);
+end;
+
+function TPayload.PayloadSize: Integer;
+var
+ Footer: TPayloadFooter;
+begin
+ // open file and assume no data
+ Result := 0;
+ Open(cReadOnlyMode);
+ try
+ // read footer and if valid return data size
+ if ReadFooter(fFile, Footer) then
+ Result := Footer.DataSize;
+ finally
+ Close;
+ end;
+end;
+
+procedure TPayload.RemovePayload;
+var
+ PLSize: Integer;
+ FileLen: Integer;
+begin
+ // get size of payload
+ PLSize := PayloadSize;
+ if PLSize > 0 then
+ begin
+ // we have payload: open file and get size
+ Open(cReadWriteMode);
+ FileLen := FileSize(fFile);
+ try
+ // seek to end of exec code an truncate file there
+ Seek(fFile, FileLen - PLSize - SizeOf(TPayloadFooter));
+ Truncate(fFile);
+ finally
+ Close;
+ end;
+ end;
+end;
+
+procedure TPayload.SetPayload(const Data;
+ const DataSize: Integer);
+var
+ Footer: TPayloadFooter;
+begin
+ // remove any existing payload
+ RemovePayload;
+ if DataSize > 0 then
+ begin
+ // we have some data: open file for writing
+ Open(cReadWriteMode);
+ try
+ // create a new footer with required data
+ InitFooter(Footer);
+ Footer.ExeSize := FileSize(fFile);
+ Footer.DataSize := DataSize;
+ // write data and footer at end of exe code
+ Seek(fFile, Footer.ExeSize);
+ BlockWrite(fFile, Data, DataSize);
+ BlockWrite(fFile, Footer, SizeOf(Footer));
+ finally
+ Close;
+ end;
+ end;
+end;
+
+end.
diff --git a/Versione CodeTyphon 7.7.txt b/Versione CodeTyphon 7.7.txt
new file mode 100644
index 0000000..e69de29
diff --git a/dgAbout.frm b/dgAbout.frm
new file mode 100644
index 0000000..8fba682
--- /dev/null
+++ b/dgAbout.frm
@@ -0,0 +1,258 @@
+object dlgAboutBox: TdlgAboutBox
+ Left = 387
+ Height = 237
+ Top = 213
+ Width = 676
+ BorderStyle = bsToolWindow
+ Caption = 'DataLock Info'
+ ClientHeight = 237
+ ClientWidth = 676
+ Color = clBtnFace
+ DesignTimePPI = 120
+ Font.Color = clBlack
+ Font.Height = -14
+ Font.Name = 'MS Sans Serif'
+ OnCreate = FormCreate
+ Position = poMainFormCenter
+ LCLVersion = '7.7'
+ object Label1: TLabel
+ Left = 240
+ Height = 23
+ Top = 16
+ Width = 84
+ Caption = 'DataLock'
+ Font.Color = clBlack
+ Font.Height = -20
+ Font.Name = 'Arial'
+ ParentFont = False
+ end
+ object Button1: TButton
+ Left = 568
+ Height = 51
+ Top = 176
+ Width = 94
+ Caption = 'Ok'
+ OnClick = Button1Click
+ TabOrder = 0
+ end
+ object Label2: TLabel
+ Left = 241
+ Height = 16
+ Top = 54
+ Width = 25
+ Caption = 'PIN:'
+ end
+ object lpin: TLabel
+ Left = 271
+ Height = 16
+ Top = 54
+ Width = 21
+ Caption = 'lpin'
+ end
+ object Label3: TLabel
+ Left = 242
+ Height = 16
+ Top = 78
+ Width = 75
+ Caption = 'Registration:'
+ end
+ object lreg: TLabel
+ Left = 344
+ Height = 16
+ Top = 78
+ Width = 23
+ Caption = 'lreg'
+ end
+ object Panel5: TPanel
+ Left = 0
+ Height = 237
+ Top = 0
+ Width = 224
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'DataLock'
+ ClientHeight = 237
+ ClientWidth = 224
+ Color = 5263440
+ Font.Color = clYellow
+ Font.Height = -30
+ Font.Name = 'Tahoma'
+ ParentColor = False
+ ParentFont = False
+ TabOrder = 1
+ object Image1: TImage
+ Left = 75
+ Height = 92
+ Top = 24
+ Width = 72
+ Picture.Data = {
+ 1754506F727461626C654E6574776F726B477261706869635A14000089504E47
+ 0D0A1A0A0000000D4948445200000080000000800806000000C33E61CB000014
+ 214944415478DAED5D7B9015557AFF4EDFD7BC194658441E2B2E2B2E89309845
+ 64C124FFAC09064DED6695D272B12A891B5D4C4955FE51A259DC40A994D9D24D
+ 8C160921BBC17235B15637AEE526594D88BBD4802622225B5944566000198679
+ CFDC47F7C9F79D7BCE9D6F7AEE9DB9AF9EDB30E7547DD37DFBDE397DFA7CBFF3
+ FB1E7D4E37802DB6D8628B2DB6D8628B2DB6D8628B2DB6D8628B2DD3A2884BED
+ 82366FDE0CE9743A90BA1DC781BD7BF7C2C183072D00C250962F5F0EAB57AF86
+ 471E7924A7F4A094CF4110894420168BC1D6AD5BA1B1B1119E7AEA290B80A92C
+ 9B366D822D5BB6C0C8C808789E07A9546AF4828418B7CF8F19254A29C77706FE
+ 8EEAE3C5FCCEBFA5128FC7D5B6AEAE0EDE7EFB6DD8BE7D3B7CF0C1071600412B
+ 7E686828A774521A0929D5ECFBA592C215CFC575DDDC3E15620502C2BE7DFB2E
+ 2A205C140058BA7429BCF9E69BD0DFDF9F533C7538DF7265D3961443A319E58A
+ 42A37B32AAA73A70DB69C0958F0D0C184CDDD41E320B8F3FFE383CF3CC331600
+ 9596975E7A0956AE5C098383834A09D4C17CB473FA46FBBF1415B11E95F25B78
+ 6815CA65F9A8BEA40ECA9EE314CABBD168F4A758DF0FD1FE9FE0F51A2010080C
+ 33101B1C387020F46C106A00BCF8E28BB062C50A35EAFDCA679DDF98C96436E1
+ 76137E5CA8472D24120965A3E97FCA35035417D6AD1C4BF237E8B3AEEB306E9F
+ 4140ECC473B97E463040A073373737C34D37DD041F7EF8A10540B9CACF37EAB1
+ 9313D8C9DBB0C3FF0C45A032A0A9A9091A1A1A94F293C9A4FA5F3322CB1DFDE4
+ ED53DD54278180FC8F818101552F7E3F8CB215DBB783DA970F0454C78C193342
+ 0B021156E5B7B7B7AB91976FD4E3A8BC153BF9799426A2DAD6D656A52052CCF0
+ F0B012365A2B2E8655E85C066404840B172EA836E2794E603B37E06FF6F9CD02
+ 31086DA98DEBD6AD0B9D391061553E8D5E13739BD185A32A821DFA0FB8BB918E
+ CF9A354B29BEBBBB5B29BF9A4A9F0C0C2D2D2D4AA9E49B74757519C6781CDBF5
+ 909F0D080474ECBDF7DE833BEFBCD30260226FFFB5D75E539DEAA77D547E0B76
+ E47F63872E232F9B94DFD3D3A3C47478D0CACF171AB6B5B5293B7FE6CC196576
+ B00D3F45937113B6C9233360A20F0201F92404820D1B365800E42BA74E9D82F3
+ E7CF8F1BF9D8D1A4FCF770BB88144F544C1D6E6C6C2D0B2997147BF9E597436F
+ 6FAF126CD37E04C16ADC7A0628060404DEF5EBD7C39123472C0078B9F7DE7B55
+ 1E9FA89F1C2F36F2E3D871BFC09F2C9A33678E52FAB973E76AAEF87C8540403E
+ 0199046CDFCF11046B4C3EC198022AC41AF3E6CD0B459B2361E9BC975F7E5951
+ 3F79DC46F9BAD328F66E27E55307EACE0D9D50E9EBEB53BE0131143A890B282C
+ 4500FC8827AA08C0741DC408EFBCF34ECDFBDD0983F2EFBBEF3EE555FB933BD8
+ 595B28A94323863ACD9887308E7E93A720D3442026BF00DBFE87D8EE3F30A6C2
+ FC8658EEC1071FB426C094E3C78F2B678E3ACE281895BF183BED97F5F5F52A8E
+ EEECECCCF904612FC45CF3E7CF87B367CF127047F0BA66E1350D1A201098297A
+ B9FDF6DBE1FDF7DFAF695BA3B5EEAC65CB96A9B89D7BF1DA69FA47632F4F9E3C
+ 99CBF997598EA2D04DFC81227FDF8AF24594B20DF5E9D3A761EEDCB9D4F63A54
+ F8DF2208EECED12E029980B06AD5AA9A03A0E60C70CF3DF728E78F4685B1FFD8
+ 39BF839FDF208F9FFC02CAC0955108557F859DFD346EBBCAF4F03F8F9B6FA23C
+ 504E5F9119A0EB21DF0001BC00DB72D23884E42C521E61D1A245D31B00C78E1D
+ 53F44F9EBF191D14EFE3762D018068B40CEA7F0DE52E945E7F1A78B2BAF81D43
+ E66B1013BC4E84556A8848DE3E992F2CBB10E07F6C188E9C417216972C5932BD
+ 9D40FF640E1A75286B67CE9C99CBB0F9EFC54F224FE3FFDF82D2CBBD6FEE3812
+ D8F2094F28F91CCD5358DF72ACFB9552DA42851C578A0CC8214449F0EF8805EE
+ BFFFFEE9ED03F847258E8C8D46093ACF5ECACD1CBA01BF99A58E73F5939092C9
+ A97CF4D147738CC347EB8D37DE086BD6AC5111899E4BE007E75770F75F51D617
+ DB20AA8B4C01FEAF40B913DBB19B9F33E8296CA106C0B5D75EABA8D0975EFD1A
+ DD6C21BB59E28C9E0E94FB4DC7F2491CE471D3BDF9C71E7B0C0E1F3E5CB0829D
+ 3B77AAED0B2FBCA0E620D0FD0576F7D1ECFF3ECA4994B9C5368C7C18021C9AB6
+ F558C76E1FA8A6AF09A0D166B2635470BF0915760DA55669E49448FF1B4CCAD5
+ 742C098D3E9AB479D75D774DA87C5EEEB8E30EB8E5965B9493C6954F5B3C8767
+ CE55AC507A9852C0B8FFBBDC04D45AF9350780AF63697FAD51A2F9BE18C1FFD9
+ 85F22B5E1F6D49F994777FF6D9674B6E1BE5EAE9F62DE520FC2316CF4537A5DE
+ 2EB26D5C1AF0D85595CE52BAA4006094A53B68A9F603C0EFC04D2458C736BFF2
+ 89459E7CF2C98A6EBA18101013F0B6EAFD6DA5A4890DA8E91A390B4CFB543053
+ 3E297E21D94A33FDAA48F900E538AF87F629CFFEDC73CF55DC3E02C1CD37DFAC
+ 289C030CE52778AEA162DB692686D035F2E3B54E6BD71C008626F5B695924174
+ 5FBD04FBFF069F054CFB145FD3ACDC6A1502414747C718B06AF98F620160EE72
+ 62996DA6A94D7B27304F87AA8E6253BA8BB1B11DFE1145CAAAF6FCBB279E7842
+ 29D0D7DEA2FD00735D325B80FB3AD33E0FE09F62EDCBC24DC6201FF37B08C420
+ 3B76ECA87A1B29822066A1D4346BEB9962B394FE049135018CFE79C798CC6009
+ 3E4027FF4C4A2A36DC2BB5501E8100C6CEF7512959419EF534B399AC09D07971
+ 3E7DBBC4D4AF30FBA49C6DDBB605D6DEFDFBF7039FE1C3CF5D2C08CCB59AEBAC
+ 350344C3C0005CE9E5808887920482A0CAA14387C6F82D85169916D35E0281B9
+ 2D3C6D0190CF09ACC48798AA69E1D568AFB976CB001576A82F9114F888F2D379
+ A9B7AAA7BABD170D03F00C6039754C2503B01B4325B779AADB7B5131403973FE
+ B832821E5137DC70C338EFBD5C06988AF64E0B1FC09F43087244D1024FBFED2E
+ B5CD53D9DE69E103F83B34C811C59F0A52AEF2A6B2BD9601A6200A28F57C9601
+ 58194EA12D951114B72C3ACDFE0F4A164EAA2EAA33A892CCC4C0C32EF324C5FF
+ 1EB4343746E9B135A528712ADB5B1300ACC449AEDFC5895937D0ACFA49D82D99
+ 7E0B8EA52E8311896BFEA011FA9C2F60EF944289F80007D103F5EE595CE33600
+ 75DE59F8DE37DE821F6C0ACA066C87E3C327A1DFBB0A52B20966B4DEFA599AD1
+ 5C3C002A682FDE48FC8BBF01F8CBEF8718001D3825F3FAE5A459D43D5F825160
+ 604BE88656E77F6058CE8714B4400FCE0729C5A7A66A13F23C34C90F210EBD50
+ 8F53F564AA1BBC5440F48F8B7D5BC441F4FCFB2029DAE0FCC7B1A3E02C297C81
+ D5682FC3D6B7FF08601D0EAC07100807FE2F6400E8C0465D8F0338339447E9C2
+ FCC98AD09F49D971D98DBBF8E045E807F2878490250000D7DAC93E68109DF8FF
+ 0358D70570C8AF10F1802800DB29FAA05E9EC3B62771FFF34211969065B617D7
+ 3A0A3A1E55DF4A6323408B18CBA21E0EACD538676AFF1EFCEAFA100160E5D5A8
+ 7C5C32E10E31C0D28E83CBB9501952D016394CD0CA1FB4A36A9F967AD54154E2
+ 9C7948601FE2829054BDE7C9740900C099BFD1682A8EB17814EB8C8A663C3A1F
+ FB2C0D41AC7951CF238499A8447C0015DA6FE146D2E94C1D8822CD966EAF3BDA
+ 5E9A6FB800DB8B9A453FC8C16B9774FD32A344D0BE48653F6B30B828115CF1D0
+ F1D7F818B43FADC23555A3637EF654169919A96F2F1280230954741C4F905A8F
+ A3E59B788C1EDDD630513D4E39AD9193BA1A8115A79C1E2CAEBDDD58EF1B1ED4
+ 3D2D4562BFE312089259FF488062CA5813EEDE181200C8BD9AFAC9C3A55E1109
+ 140797730EBF027C11457826C386BB081E3544767A4EE24F946970B32020134A
+ 373DB7FD13C023DFABB10958750DFE496B5BE5283F57D93A470EEFC5435F0263
+ 22A5E25064FD85E045DA081F16104CE1D2431390C1A570C913D9BEA4638236EE
+ 371C77A8DE739A370A87403092FD5E521415021F60DD4A0A8FB04DD858871A46
+ CBB865720BEE7D49E8518F3406EE67BE06D0B216A9029DBE7417D48EB8C30A02
+ 3499B136EC3F5C517CE1DFC1E97A25EB2C67D9E0EBE00EBE0A4EDDCBE4887AE0
+ 568DBE2B06405A2FECA1C72179CAB1F3228E271F2640A8918F17E45EF92D5CA7
+ FB33708E3D002293B2CA9EC89CC65AC0BBEC56ECB36D10F915F61B32836202E9
+ ED40F2570010C2D58C5A253FA6F256671B2384435CF655FC5C4F8090F8D95DF8
+ 103827BE03914F7F9855BE002B138848E3B3044EEF01E7D31F80BBE0CFB37E5F
+ 96F2AFC238F03754D2C990A7170206C8C5A88AFE1151AEBBC684C6DE6C5C4CDB
+ F977B83AB233DB56691DC1A22D423F3E51D46904AFEDB7C1E9FECFEC18F3C45A
+ 0C95DE5560A952F4533900746308982A8721646B2E7F8161A033F4B1760E6D29
+ B55F9DDE0EF0E6DE9DED5F47F959AD0A097AB0852211A4A85ED3916AA41EE9A2
+ FE4A8C66DF1A1DF9B694C904FF0B9E53871D3B42FD2B8133A908030398E4866E
+ D46822A8059F8E703CEBC95A0094EF5B0D1EC100E1B378EBF428F6B1CC1DA75D
+ 110A1FC098806C221B72F31BD0EE5BC557A1B818EC67FAB37DECD20893B93E0F
+ 050390C2A546243E3A6134AC48768D36D496CA4AF26C36058CF1BF7045364924
+ 01BC303080D1B1A776E45847DF2ABF7ABE8034A65FC5D7EADE61281241634D80
+ 57B50C952DF9BB3A17FC85CD04787AB43B76D40756BC313789426202C6300035
+ CAB18A0A8C013C36EAC3C200823380B40C102803C8B10C2042C9001600813A82
+ 637204A1F3012C034C290384CB07F0C637D2962A33009F241A1A1F80E7016C14
+ 102C03B018BB4AFAAF0203783C0F60E7F9049F07600C100613E009960AB60C10
+ 781E40701F202C61A0C79C409A156C3110CCE897D92C70CED70A4D18480D11BE
+ 052DB6041B068E490AD53A0CF46C1838E561A017A63050D844D0D433409852C1
+ 96016AC300C232806580F0F8001A8D9601820D034DEC4F775DBDB0AC0B506B1A
+ C4789AB2A5FAA1A019F5D58AB42AF7014456E9B94490D553700CC014EFC9D141
+ 577313C067048D3E04C9966A8F7E2946FB36B43382EC2AA00041606704D93010
+ 1803D81941D3380CB433822C03847456B005C0F46200EB03581FC032C0543180
+ 60C980D02D0EF5EC8CA0C0190046079A74C2B8385453932DC114A5FBD04D0A1D
+ B338D44E0A0DD40440D8C3406B028235017671E83467009B0AB661A00D03A733
+ 03D854B06580F0FB001600D38B01047F4A986580C0194084CD07306B03734BC3
+ 2C00022B6A469079974058D606E65607DBE703046F020CF59BC997614C055B13
+ 10A0090008E1F3016C2A786A1920D46120D869E1813340A8C340EB0304CB0022
+ 840C40EF7D36F30154232D0504C7001E0B03693E40A6860058BC7831FCFAB215
+ 70F5828F21290FA31398516FD08CE83781DB120C09982020834F0D5FD68EAF6B
+ 7DEB60F50070DB6DB781EB661548DBE5CB97437B7B3B22CFCB83467C7839F27D
+ 24D5059F0CFC1734A63E8198771E66247F3920EDCA9040349F711A7A4622B320
+ 1D9D01439105D0D6FE65F8E77F590822CF5AAC28BE5972D7AE5D108BC5B4F910
+ 70F0E041387AF4E8D87A1F7EF861B8EEBAEB9442D3E9F43825CB09323B2A1CC5
+ 579934A53E8286F409A8CB9C81D691C35F6F489FFEBE5559F5CB7074F617FBEA
+ AE7977243A4701A0AFFE0BE03A0D055D81482432EEB343EF2D4670ECDEBD1B0E
+ 1D3A04E2F9E79F9F50C913DA7F85CC3424F08D97F5E9D310CF9C8396D44775B3
+ 877E3E442F09B72AAB6A08D0D9D9F2E579697CEB2A020146A297E3F60AF405E2
+ 657534814101A244E59B37DC91AB17C19D081A81A82BEAA303F12BA37DF5BF16
+ 3BD5FC7B99DEC4D5DFB12B44AB4BFF3D754BBE75AE61AD93726646D34E2BF679
+ 6304DFCA4E3A70985E8A2E64E253A914883D7BF64CA4E442DB8816F559E6FE4F
+ 20209C6822733EB6A273F38F2390596279A072E50F4567BD7E60FEDFDF1DF506
+ B17F85CCDA7CE9E9C5C2AE169D942FB8CD3B240D008456684C3B86661B659F8D
+ D2E9735C4BD4070CFA5D0241908865BA9BAF3DBBF5A1864CD762AF647CDA62E6
+ 56F4243EB7EFD09C6F6F174266C4E86BBA8D6229104C69C93030A4F5672369B6
+ 7539180800A4387CDF3B34A034A3E09BE9A15E4B9D96045378DC77DC611145CC
+ 7C87488D535038B7FFF5A573FBFFEDEAA6F499360B83A275EF0DC417749D68F9
+ CAFB5D4DBFF90B478E90F2479822410300DF27AF8E8F3010A4F4F161B61D4219
+ 44E9D7FB4930B7161000A4B05694D92857A07C467F6ED2A06860CA360048E863
+ 311F0398EFE9782C0BE28894EAA5D26332448E8F711C068E4A4022185339ECA4
+ A2741DE43AD963234B56A6D7DCD6F38D485F9C4D6FDFA297426530DFE399DF19
+ 057306486BE527D9F7061446E903283D28E7503AF5B647FF4E1A85D1C89F87F2
+ 3994851A0C2D8C09EA7D662156407911EE23A8F749D3F549379F72B95F21F27C
+ 071502A1524071855543F1E0AB8FDBE77CE7345B6EE3DD02204AFBE87E442B9F
+ 40D08782EFF0834F745F1870A40C0004536A8229DC3FFA134CE1DC3F88F83A9C
+ 33827F148A09140605C05029102AF95F59A5F670A50BDF00C8F73BCE3EA64F3D
+ AD23C980E1B001E73106E06F6C4C33C6363ACB5D5354FFD3804649BDAEA89731
+ 401DDBC698D20D60620540102D81E2797451097587D09CE746ABEB536AB12622
+ 03635F132199A3976466848FFE216DFB07350374A39C4139AF759D31E78B6A2A
+ E8D507E8CBD3DA24343067CFB0425C2B87FB01091FAA8C1D4EF89CC789006000
+ 152F00A88B55F950C05B979300803B7349E67F48F67DD267FF3DBD1D66001866
+ 7E409FB6FD7DECF74A3169F6CFE4257ECAC2BC18534C9C8D7E1E0DC42700401D
+ A31EA7804D3426A8AE00A02E7606307D6BBC75EEC9E733570630234CC1F90090
+ F279FFAE0F687E314049335F227733C8381A298D18C747C963123F3E8A37DF71
+ 0FDFF101273209FD472600D4A540FF69369AD345980197292E9DC774F8E37D8F
+ 3994AECF71F41880C69D373A2EE33CF6476202AFDA81FC69485120632826F1D8
+ 0B01EA1208EBC7286BB2705242FE0C9F2C002E6F82A865D2E8254A3704CC2DE0
+ 49EC52391E7729E15821405D0AC52B10F695137E567C97856E0DD35D41BA552C
+ D6AD5B071B376E9C0804354B835F420C109E4E45E5D36DE023478EC0ABAFBE0A
+ FF0F0443538222AE1AC90000000049454E44AE426082
+ }
+ Proportional = True
+ Stretch = True
+ end
+ end
+end
diff --git a/dgAbout.pas b/dgAbout.pas
new file mode 100644
index 0000000..be838be
--- /dev/null
+++ b/dgAbout.pas
@@ -0,0 +1,80 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+
+unit dgAbout;
+
+{$MODE Delphi}
+
+interface
+
+uses
+ LCLIntf, LCLType, LMessages, Classes, Graphics, Forms, Controls, StdCtrls,
+ Buttons, ExtCtrls;
+
+type
+
+ { TdlgAboutBox }
+
+ TdlgAboutBox = class(TForm)
+ Button1: TButton;
+ Image1: TImage;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ lpin: TLabel;
+ lreg: TLabel;
+ Panel5: TPanel;
+ procedure Button1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ dlgAboutBox: TdlgAboutBox;
+
+implementation
+
+{$R *.frm}
+
+uses
+ AbConst, FmReader;
+
+procedure TdlgAboutBox.FormCreate(Sender: TObject);
+begin
+ lpin.Caption:=ReaderForm.pin;
+ lreg.Caption:=ReaderForm.codregistrazione;
+// lreg.Caption:=ReaderForm.codseriale;
+end;
+
+procedure TdlgAboutBox.Button1Click(Sender: TObject);
+begin
+ close;
+end;
+
+
+
+
+
+end.
+
diff --git a/getvers.pas b/getvers.pas
new file mode 100644
index 0000000..abfe321
--- /dev/null
+++ b/getvers.pas
@@ -0,0 +1,34 @@
+unit getvers;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils {$ifdef linux}, getvers_lin {$endif} {$ifdef windows}, getvers_win, getvers_simple_win{$endif} ;
+
+Type
+
+ FilePath = String;
+
+ Function GetVersion (Var FilePath : String): String;
+
+
+implementation
+
+Function GetVersion (Var FilePath : String): String;
+var xvers : string;
+
+begin
+ {$ifdef windows}
+ result:=GetVersionSimpleWin(FilePath);
+ {$else}
+ GetProgramVersion(xvers,FilePath);
+ result:=xvers;
+ {$endif}
+
+end;
+
+
+end.
+
diff --git a/getvers_lin.pas b/getvers_lin.pas
new file mode 100644
index 0000000..b948645
--- /dev/null
+++ b/getvers_lin.pas
@@ -0,0 +1,263 @@
+unit getvers_lin;
+{$mode objfpc}{$H+}
+
+interface
+
+uses SysUtils;
+
+Type
+ TVersionQuad = Array[1..4] of Word;
+ TVersionCompare = (vcEqual,
+ vcBuildDiffers,
+ vcMinorDiffers,
+ vcMajorDiffers,
+ vcReleaseDiffers);
+
+Function ExpandVersion(Const S : String) : String;
+Function ExtractVersionQuad(S : String; Var Quad : TVersionQuad) : Boolean;
+Function VersionQuadToString(Const Quad : TVersionQuad) : String;
+Function CompareVersionQuads(Quad1,Quad2 : TVersionQuad) : TVersionCompare;
+// Returns true if Q1 is newer as Q2
+Function NewerVersion(Q1,Q2 : TVersionQuad) : Boolean;
+Function NewerVersion(V1,V2 : String) : Boolean;
+Function CompareVersionString(Quad1,Quad2 : TVersionQuad;Const S1,S2 :
+String) : String;
+Function GetProgramVersion (Var Version : String; Var FilePath:string): Boolean;
+Function GetProgramVersion (Var Version : TVersionQuad; Var FilePath:string) : Boolean;
+
+
+implementation
+
+uses {$ifdef windows}
+ fileinfo;
+ {$else}
+ resource, elfreader, versiontypes,versionresource;
+ {$endif}
+
+{$ifndef windows}
+
+Function GetProgramVersion (Var Version : String; Var FilePath:string): Boolean;
+
+Var
+ C : TVersionQuad;
+
+begin
+ Result:=GetProgramVersion(C,FilePath);
+ if Result then
+ Version:=VersionQuadToString(C);
+end;
+
+Function GetProgramVersion (Var Version : TVersionQuad; Var FilePath:string) : Boolean;
+
+Var
+ RS : TResources;
+ E : TElfResourceReader;
+ VR : TVersionResource;
+ I : Integer;
+
+
+begin
+ if FilePath='' then FilePath:=ParamStr(0);
+ RS:=TResources.Create;
+ try
+ E:=TElfResourceReader.Create;
+ try
+ Rs.LoadFromFile(FilePath,E);
+ finally
+ E.Free;
+ end;
+ VR:=Nil;
+ I:=0;
+ While (VR=Nil) and (INil);
+ if Result then
+ For I:=1 to 4 do
+ Version[i]:=VR.FixedInfo.FileVersion[I-1];
+ Finally
+ RS.FRee;
+ end;
+end;
+{$else linux}
+
+Function GetProgramVersion (Var Version : String; Var FilePath:string) : Boolean;
+
+Var
+ V : TFileVersionInfo;
+
+begin
+ V:=TFileVersionInfo.Create(Nil);
+ With V do
+ try
+ if FilePath='' then FilePath:=ParamStr(0);
+ FileName:=FilePath;
+// Version:=V.getVersionSetting('ProductVersion');
+ if (Version='') then
+// Version:=V.GetVersionSetting('FileVersion');
+ Result:=(Version<>'');
+ Finally
+ Free;
+ end;
+end;
+
+Function GetProgramVersion (Var Version : TVersionQuad; Var FilePath:string) : Boolean;
+
+Var
+ S : String;
+
+begin
+ Result:=GetProgramVersion(S,FilePath);
+ If Result then
+ Result:=ExtractVersionQuad(S,Version);
+end;
+
+
+{$endif}
+
+Function CompareVersionQuads(Quad1,Quad2 : TVersionQuad) : TVersionCompare;
+
+Const
+ EqualResults : Array[1..4] of TVersionCompare =
+ (vcReleaseDiffers,vcMajorDiffers,vcMinorDiffers,vcBuildDiffers);
+
+Var
+ I : Integer;
+begin
+ Result:=vcEqual;
+ I:=1;
+ While (Result=vcEqual) and (I<5) do
+ If Quad1[i]<>Quad2[i] then
+ Result:=EqualResults[i]
+ else
+ inc(I);
+end;
+
+function ExpandVersion(const S: String): String;
+
+Var
+ I,Dots : Integer;
+
+begin
+ Dots:=0;
+ For i:=1 to length(S) do
+ if S[i]='.' then
+ Inc(Dots);
+ Result:=S;
+ while (Dots<3) do
+ begin
+ Result:=result+'.0';
+ Inc(Dots);
+ end;
+end;
+
+Function ExtractVersionQuad(S : String; Var Quad : TVersionQuad) : Boolean;
+
+Var
+ I,P,Dots,Q : Integer;
+
+begin
+ Result:=True;
+ FillChar(Quad,SizeOf(Quad),0);
+ Dots:=0;
+ I:=0;
+ While Result and (S<>'') and (I<4) do
+ begin
+ inc(i);
+ P:=Pos('.',S);
+ If (P=0) then
+ P:=Length(S)+1
+ else
+ inc(Dots);
+ Q:=StrToIntDef(Copy(S,1,P-1),-1);
+ Delete(S,1,P);
+ Result:=Q<>-1;
+ If Result then
+ Quad[I]:=Q;
+ end;
+ Result:=(Dots=3);
+end;
+
+
+Resourcestring
+ SVersionsequal = 'Versione %s e %s sono uguali.';
+ SDiffers = 'La %s della versione %s (%s) e %s (%s) sono diversi.';
+ SBuild = 'Build';
+ SMinor = 'Minor';
+ SMajor = 'Major';
+ SRelease = 'Release';
+
+function NewerVersion(V1, V2: String): Boolean;
+
+Var
+ Q1,Q2 : TVersionQuad;
+
+begin
+ if ExtractVersionQuad(V1,Q1) and ExtractVersionQuad(V2,Q2) then
+ Result:=NewerVersion(Q1,Q2)
+ else
+ Result:=False;
+end;
+
+Function CompareVersionString(Quad1,Quad2 : TVersionQuad;Const S1,S2 :
+String) : String;
+
+Var
+ Fmt,V1,V2 : String;
+
+begin
+ V1:='';
+ V2:='';
+ Case CompareversionQuads(Quad1,Quad2) of
+ vcBuildDiffers : begin
+
+V1:=Format('%d.%d.%d.%d',[Quad1[1],Quad1[2],Quad1[3],Quad1[4]]);
+
+V2:=Format('%d.%d.%d.%d',[Quad2[1],Quad2[2],Quad2[3],Quad2[4]]);
+ Fmt:=SBuild;
+ end;
+ vcMinorDiffers : begin
+ V1:=Format('%d.%d.%d',[Quad1[1],Quad1[2],Quad1[3]]);
+ V2:=Format('%d.%d.%d',[Quad2[1],Quad2[2],Quad2[3]]);
+ Fmt:=SMinor;
+ end;
+ vcMajorDiffers : begin
+ V1:=Format('%d.%d',[Quad1[1],Quad1[2]]);
+ V2:=Format('%d.%d',[Quad2[1],Quad2[2]]);
+ Fmt:=SMajor;
+ end;
+ vcReleaseDiffers : begin
+ V1:=Format('%d',[Quad1[1]]);
+ V2:=Format('%d',[Quad2[1]]);
+ Fmt:=SRelease;
+ end;
+ end;
+ If (V1='') and (V2='') then
+ Result := Format(SVersionsequal,[S1,S2])
+ else
+ Result := Format(SDiffers,[Fmt,S1,V1,S2,V2]);
+end;
+
+Function VersionQuadToString(Const Quad : TVersionQuad) : String;
+
+begin
+ Result:=Format('%d.%d.%d.%d',[Quad[1],Quad[2],Quad[3],Quad[4]]);
+end;
+
+Function NewerVersion(Q1,Q2 : TVersionQuad) : Boolean;
+
+begin
+ Result:=False;
+ Case CompareVersionQuads(Q1,Q2) of
+ vcEqual : Result:=False;
+ vcBuildDiffers : Result:=Q1[4]>Q2[4];
+ vcMinorDiffers : Result:=Q1[3]>Q2[3];
+ vcMajorDiffers : Result:=Q1[2]>Q2[2];
+ vcReleaseDiffers : Result:=Q1[1]>Q2[1];
+ end;
+end;
+
+end.
diff --git a/getvers_simple_win.pas b/getvers_simple_win.pas
new file mode 100644
index 0000000..2d41a70
--- /dev/null
+++ b/getvers_simple_win.pas
@@ -0,0 +1,46 @@
+unit getvers_simple_win;
+
+{$mode objfpc} {$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileInfo;
+
+type
+ GetFile = String;
+
+ Function GetVersionSimpleWin (Var GetFile : String): String;
+
+
+implementation
+
+Function GetVersionSimpleWin (Var GetFile : String): String;
+var xinfo: tfileversioninfo;
+ r:word;
+ txt:string;
+begin
+ if GetFile='' then GetFile:=Paramstr(0);
+ xinfo := TFileVersionInfo.Create(nil);
+ xinfo.fileName:=GetFile;
+ xinfo.ReadFileInfo;
+// result:= xinfo.VersionStrings[4]; // fileversion
+ // txt:=xinfo.VersionStrings[4];
+ // result:= rightstr(txt,length(txt)-12);
+
+
+ for r:=0 to xinfo.VersionStrings.Count-1 do begin
+ // if ansipos('fileversion',lowercase(xinfo.VersionStrings[r])) > -1 then begin
+ if copy(lowercase(xinfo.VersionStrings[r]),0,11)='fileversion' then begin
+ txt:=xinfo.VersionStrings[r];
+ result:=rightstr(txt,length(txt)-12);
+ // break;
+ // result:='trovato in item '+inttostr(r);
+ end;
+ end;
+
+ //result:='';
+end;
+
+end.
+
diff --git a/getvers_win.pas b/getvers_win.pas
new file mode 100644
index 0000000..d80c765
--- /dev/null
+++ b/getvers_win.pas
@@ -0,0 +1,114 @@
+unit getvers_win;
+
+{$mode objfpc}
+
+interface
+
+uses
+ Classes, SysUtils, resource, versiontypes, versionresource;
+
+type
+ { TVersionInfo }
+
+ TVersionInfo = class
+ private
+ FVersResource: TVersionResource;
+ function GetFixedInfo: TVersionFixedInfo;
+ function GetStringFileInfo: TVersionStringFileInfo;
+ function GetVarFileInfo: TVersionVarFileInfo;
+
+ function SearchValue(const aString : string) : string;
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+ function CompanyName : string;
+ function InternalName : string;
+ function FileVersion : string;
+
+ procedure Load(Instance: THandle);
+ property FixedInfo: TVersionFixedInfo read GetFixedInfo;
+ property StringFileInfo: TVersionStringFileInfo read GetStringFileInfo;
+ property VarFileInfo: TVersionVarFileInfo read GetVarFileInfo;
+ end;
+
+implementation
+
+{ TVersionInfo }
+
+function TVersionInfo.GetFixedInfo: TVersionFixedInfo;
+begin
+ Result := FVersResource.FixedInfo;
+end;
+
+function TVersionInfo.GetStringFileInfo: TVersionStringFileInfo;
+begin
+ Result := FVersResource.StringFileInfo;
+end;
+
+function TVersionInfo.GetVarFileInfo: TVersionVarFileInfo;
+begin
+ Result := FVersResource.VarFileInfo;
+end;
+
+function TVersionInfo.SearchValue(const aString: string): string;
+var s : TVersionStringTable;
+ i,j : integer;
+begin
+ result := '';
+ for i:=0 to StringFileInfo.Count-1 do begin
+ s := StringFileInfo.Items[i];
+ for j:=0 to s.Count-1 do
+ if s.Keys[j] = aString then begin
+ result := s.Values[j];
+ break;
+ end;
+ end;
+end;
+
+function TVersionInfo.CompanyName: string;
+begin
+ Result := SearchValue('CompanyName');
+end;
+
+function TVersionInfo.InternalName: string;
+begin
+ Result := SearchValue('InternalName');
+end;
+
+function TVersionInfo.FileVersion: string;
+begin
+ Result := SearchValue('FileVersion');
+end;
+
+constructor TVersionInfo.Create;
+begin
+ inherited Create;
+ FVersResource := TVersionResource.Create;
+ Load(HInstance);
+end;
+
+destructor TVersionInfo.Destroy;
+begin
+ FVersResource.Free;
+ inherited Destroy;
+end;
+
+procedure TVersionInfo.Load(Instance: THandle);
+var
+ Stream: TResourceStream;
+begin
+ Stream := TResourceStream.CreateFromID(Instance, 1, PChar(RT_VERSION));
+ try
+ FVersResource.SetCustomRawDataStream(Stream);
+
+ // access some property to load from the stream
+ FVersResource.FixedInfo;
+ // clear the stream
+ FVersResource.SetCustomRawDataStream(nil);
+ finally
+ Stream.Free;
+ end;
+end;
+
+end.
diff --git a/ubasedlg.frm b/ubasedlg.frm
new file mode 100644
index 0000000..b4ef68d
--- /dev/null
+++ b/ubasedlg.frm
@@ -0,0 +1,96 @@
+object BaseDirDlg: TBaseDirDlg
+ Left = 387
+ Height = 185
+ Top = 242
+ Width = 621
+ BorderStyle = bsToolWindow
+ Caption = 'BaseDirDlg'
+ ClientHeight = 185
+ ClientWidth = 621
+ DesignTimePPI = 120
+ Font.Color = clWindowText
+ Font.Height = -14
+ Font.Name = 'MS Sans Serif'
+ Position = poScreenCenter
+ LCLVersion = '7.7'
+ object Button1: TButton
+ Left = 518
+ Height = 31
+ Top = 149
+ Width = 94
+ Caption = '&OK'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ end
+ object Button2: TButton
+ Left = 408
+ Height = 31
+ Top = 149
+ Width = 94
+ Caption = '&Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ end
+ object CheckBox2: TCheckBox
+ Left = 248
+ Height = 20
+ Top = 109
+ Width = 89
+ Caption = 'CheckBox2'
+ TabOrder = 4
+ end
+ object CheckBox1: TCheckBox
+ Left = 248
+ Height = 20
+ Top = 79
+ Width = 89
+ Caption = 'CheckBox1'
+ TabOrder = 2
+ end
+ object Button3: TButton
+ Left = 438
+ Height = 21
+ Top = 81
+ Width = 134
+ Caption = '&Create Directory...'
+ OnClick = Button3Click
+ TabOrder = 3
+ Visible = False
+ end
+ object DirectoryEdit1: TDirectoryEdit
+ Left = 240
+ Height = 24
+ Top = 29
+ Width = 374
+ OnAcceptDirectory = DirectoryEdit1AcceptDirectory
+ ShowHidden = False
+ ButtonWidth = 29
+ NumGlyphs = 1
+ MaxLength = 0
+ TabOrder = 5
+ end
+ object Label1: TLabel
+ Left = 240
+ Height = 16
+ Top = 8
+ Width = 40
+ Caption = 'Extract'
+ end
+ object Panel5: TPanel
+ Left = 0
+ Height = 185
+ Top = 0
+ Width = 224
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'DataLock'
+ Color = 5263440
+ Font.Color = clYellow
+ Font.Height = -30
+ Font.Name = 'Tahoma'
+ ParentColor = False
+ ParentFont = False
+ TabOrder = 6
+ end
+end
diff --git a/ubasedlg.pas b/ubasedlg.pas
new file mode 100644
index 0000000..b408c0c
--- /dev/null
+++ b/ubasedlg.pas
@@ -0,0 +1,84 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+unit ubasedlg;
+
+{$mode objfpc}
+
+interface
+
+uses
+ LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, FileCtrl, EditBtn, ExtCtrls;
+
+type
+
+ { TBaseDirDlg }
+
+ TBaseDirDlg = class(TForm)
+ Button1: TButton;
+ Button2: TButton;
+ DirectoryEdit1: TDirectoryEdit;
+ CheckBox2: TCheckBox;
+ CheckBox1: TCheckBox;
+ Button3: TButton;
+ Label1: TLabel;
+ Panel5: TPanel;
+ procedure Button3Click(Sender: TObject);
+ procedure DirectoryEdit1AcceptDirectory(Sender: TObject; Var Value: String);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BaseDirDlg: TBaseDirDlg;
+
+implementation
+
+{$R *.frm}
+
+uses
+ AbUtils,
+ uDemoDlg;
+
+procedure TBaseDirDlg.Button3Click(Sender: TObject);
+begin
+ DemoDlg := TDemoDlg.Create( Self );
+ try
+ DemoDlg.Caption := 'Create Subdirectory';
+ DemoDlg.Edit1.Text := '';
+ DemoDlg.ShowModal; {
+ if ( DemoDlg.ModalResult = mrOK ) and ( DemoDlg.Edit1.Text <> '' ) then
+ AbCreateDirectory( DLB.Directory + '\' + DemoDlg.Edit1.Text );
+ DLB.Update; }
+ finally
+ DemoDlg.Free;
+ end;
+end;
+
+procedure TBaseDirDlg.DirectoryEdit1AcceptDirectory(Sender: TObject;
+ Var Value: String);
+begin
+ //showmessage(value);
+end;
+
+end.
diff --git a/udemodlg.frm b/udemodlg.frm
new file mode 100644
index 0000000..2acc88a
--- /dev/null
+++ b/udemodlg.frm
@@ -0,0 +1,44 @@
+object DemoDlg: TDemoDlg
+ Left = 287
+ Height = 125
+ Top = 242
+ Width = 388
+ ActiveControl = Edit1
+ Caption = 'DemoDlg'
+ ClientHeight = 125
+ ClientWidth = 388
+ DesignTimePPI = 120
+ Font.Color = clWindowText
+ Font.Height = -14
+ Font.Name = 'MS Sans Serif'
+ Position = poScreenCenter
+ LCLVersion = '7.7'
+ object Button1: TButton
+ Left = 280
+ Height = 31
+ Top = 10
+ Width = 94
+ Caption = '&OK'
+ Default = True
+ ModalResult = 1
+ OnClick = Button1Click
+ TabOrder = 0
+ end
+ object Button2: TButton
+ Left = 280
+ Height = 31
+ Top = 50
+ Width = 94
+ Caption = '&Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ end
+ object Edit1: TEdit
+ Left = 10
+ Height = 24
+ Top = 10
+ Width = 261
+ TabOrder = 2
+ Text = 'Edit1'
+ end
+end
diff --git a/udemodlg.pas b/udemodlg.pas
new file mode 100644
index 0000000..6f84df3
--- /dev/null
+++ b/udemodlg.pas
@@ -0,0 +1,61 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+
+unit udemodlg;
+
+{$mode objfpc}
+
+interface
+
+uses
+ LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+
+ { TDemoDlg }
+
+ TDemoDlg = class(TForm)
+ Button1: TButton;
+ Button2: TButton;
+ Edit1: TEdit;
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DemoDlg: TDemoDlg;
+
+implementation
+
+{$R *.frm}
+
+{ TDemoDlg }
+
+procedure TDemoDlg.Button1Click(Sender: TObject);
+begin
+
+end;
+
+end.
diff --git a/unit2.frm b/unit2.frm
new file mode 100644
index 0000000..25ef485
--- /dev/null
+++ b/unit2.frm
@@ -0,0 +1,40 @@
+object Form2: TForm2
+ Left = 344
+ Height = 468
+ Top = 426
+ Width = 540
+ BorderStyle = bsNone
+ Caption = 'Form2'
+ ClientHeight = 468
+ ClientWidth = 540
+ DesignTimePPI = 120
+ OnCreate = FormCreate
+ LCLVersion = '7.7'
+ object FileListBox1: TFileListBox
+ Left = 112
+ Height = 310
+ Top = 110
+ Width = 328
+ Directory = 'C:\codetyphon\typhon\bin32'
+ FileType = [ftReadOnly, ftHidden]
+ ItemHeight = 0
+ Mask = '*.sd'
+ OnDblClick = FileListBox1DblClick
+ TabOrder = 0
+ end
+ object Button1: TButton
+ Left = 218
+ Height = 31
+ Top = 39
+ Width = 94
+ Caption = 'Button1'
+ OnClick = Button1Click
+ TabOrder = 1
+ end
+ object seldir: TSelectDirectoryDialog
+ Options = [ofEnableSizing, ofForceShowHidden, ofViewDetail]
+ OnFolderChange = seldirFolderChange
+ Left = 140
+ Top = 20
+ end
+end
diff --git a/unit2.pas b/unit2.pas
new file mode 100644
index 0000000..160d601
--- /dev/null
+++ b/unit2.pas
@@ -0,0 +1,88 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+unit unit2;
+
+{$mode objfpc}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, EditBtn,
+ FileCtrl, StdCtrls,dos;
+
+type
+
+ { TForm2 }
+
+ TForm2 = class(TForm)
+ Button1: TButton;
+ FileListBox1: TFileListBox;
+ seldir: TSelectDirectoryDialog;
+ procedure Button1Click(Sender: TObject);
+ procedure DirectoryEdit1Change(Sender: TObject);
+ procedure FileListBox1DblClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure seldirFolderChange(Sender: TObject);
+ private
+ { private declarations }
+ public
+ { public declarations }
+ end;
+
+var
+ Form2: TForm2;
+
+implementation
+ uses umain;
+{$R *.frm}
+
+{ TForm2 }
+
+procedure TForm2.FileListBox1DblClick(Sender: TObject);
+begin
+ form1.AbZipOutline1.FileName:=filelistbox1.FileName;
+ FileSetAttr(filelistbox1.FileName, hidden);
+ hide;
+ form1.Show;
+end;
+
+procedure TForm2.FormCreate(Sender: TObject);
+begin
+ seldir.FileName:=extractfilepath(paramstr(0));
+end;
+
+procedure TForm2.seldirFolderChange(Sender: TObject);
+begin
+ filelistbox1.Directory:=seldir.FileName;
+end;
+
+procedure TForm2.DirectoryEdit1Change(Sender: TObject);
+begin
+
+end;
+
+procedure TForm2.Button1Click(Sender: TObject);
+begin
+ if seldir.Execute then seldirFolderChange(Sender);
+end;
+
+end.
+
diff --git a/unit_crea_apri.frm b/unit_crea_apri.frm
new file mode 100644
index 0000000..e89ec62
--- /dev/null
+++ b/unit_crea_apri.frm
@@ -0,0 +1,95 @@
+object Form_creaapri: TForm_creaapri
+ Left = 387
+ Height = 176
+ Top = 242
+ Width = 769
+ BorderStyle = bsToolWindow
+ Caption = 'DataLock'
+ ClientHeight = 176
+ ClientWidth = 769
+ Color = 12303291
+ DesignTimePPI = 120
+ OnShow = FormShow
+ Position = poMainFormCenter
+ LCLVersion = '7.7'
+ object Panel1: TPanel
+ Left = 240
+ Height = 160
+ Top = 8
+ Width = 522
+ BevelOuter = bvNone
+ ClientHeight = 160
+ ClientWidth = 522
+ Color = 15921906
+ ParentColor = False
+ TabOrder = 0
+ object FileNameEdit1: TFileNameEdit
+ Left = 20
+ Height = 28
+ Top = 40
+ Width = 480
+ DialogTitle = 'Apri DataLock'
+ Filter = 'DataLock|*.ldk'
+ FilterIndex = 1
+ DefaultExt = '.ldk'
+ HideDirectories = False
+ ButtonWidth = 29
+ NumGlyphs = 1
+ MaxLength = 0
+ TabOrder = 0
+ end
+ object Label1: TLabel
+ Left = 20
+ Height = 20
+ Top = 10
+ Width = 62
+ Caption = 'DataLock'
+ end
+ object editserialepersonale: TLabeledEdit
+ Left = 20
+ Height = 28
+ Top = 110
+ Width = 169
+ EditLabel.Height = 20
+ EditLabel.Width = 169
+ EditLabel.Caption = 'Personal Code'
+ MaxLength = 6
+ TabOrder = 1
+ end
+ object Button1: TButton
+ Left = 419
+ Height = 31
+ Top = 120
+ Width = 94
+ Caption = 'Ok'
+ ModalResult = 1
+ TabOrder = 2
+ end
+ object Button2: TButton
+ Left = 310
+ Height = 31
+ Top = 120
+ Width = 94
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 3
+ Visible = False
+ end
+ end
+ object Panel5: TPanel
+ Left = 0
+ Height = 176
+ Top = 0
+ Width = 224
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'DataLock'
+ Color = 5263440
+ Font.Color = clYellow
+ Font.Height = -30
+ Font.Name = 'Tahoma'
+ ParentColor = False
+ ParentFont = False
+ TabOrder = 1
+ end
+end
diff --git a/unit_crea_apri.pas b/unit_crea_apri.pas
new file mode 100644
index 0000000..fdd861a
--- /dev/null
+++ b/unit_crea_apri.pas
@@ -0,0 +1,65 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+unit unit_crea_apri;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
+ ExtCtrls, EditBtn;
+
+type
+
+ { TForm_creaapri }
+
+ TForm_creaapri = class(TForm)
+ Button1: TButton;
+ Button2: TButton;
+ editserialepersonale: TLabeledEdit;
+ FileNameEdit1: TFileNameEdit;
+ Label1: TLabel;
+ Panel1: TPanel;
+ Panel5: TPanel;
+ procedure FormShow(Sender: TObject);
+ private
+
+ public
+
+ end;
+
+var
+ Form_creaapri: TForm_creaapri;
+
+implementation
+uses umain;
+{$R *.frm}
+
+{ TForm_creaapri }
+
+procedure TForm_creaapri.FormShow(Sender: TObject);
+begin
+ editserialepersonale.Text:=form1.codiceserialepersonale;
+end;
+
+end.
+
diff --git a/unit_crypt.frm b/unit_crypt.frm
new file mode 100644
index 0000000..db5fa64
--- /dev/null
+++ b/unit_crypt.frm
@@ -0,0 +1,133 @@
+object Form_crypt: TForm_crypt
+ Left = 387
+ Height = 412
+ Top = 242
+ Width = 701
+ Caption = 'Form_crypt'
+ ClientHeight = 412
+ ClientWidth = 701
+ DesignTimePPI = 120
+ OnCreate = FormCreate
+ LCLVersion = '7.7'
+ object boxInputFile: TFileNameEdit
+ Left = 18
+ Height = 28
+ Top = 41
+ Width = 372
+ FileName = 'boxInputFile'
+ FilterIndex = 0
+ HideDirectories = False
+ ButtonWidth = 29
+ NumGlyphs = 1
+ MaxLength = 0
+ TabOrder = 0
+ Text = 'boxInputFile'
+ end
+ object boxOutputFile: TFileNameEdit
+ Left = 18
+ Height = 28
+ Top = 110
+ Width = 372
+ FileName = 'boxOutputFile'
+ FilterIndex = 0
+ HideDirectories = False
+ ButtonWidth = 29
+ NumGlyphs = 1
+ MaxLength = 0
+ TabOrder = 1
+ Text = 'boxOutputFile'
+ end
+ object Label1: TLabel
+ Left = 18
+ Height = 20
+ Top = 19
+ Width = 85
+ Caption = 'File sorgente'
+ end
+ object Label2: TLabel
+ Left = 18
+ Height = 20
+ Top = 86
+ Width = 111
+ Caption = 'File destinazione'
+ end
+ object btnEncrypt: TButton
+ Left = 18
+ Height = 31
+ Top = 160
+ Width = 94
+ Caption = 'Encrypt'
+ OnClick = btnEncryptClick
+ TabOrder = 2
+ end
+ object btnDecrypt: TButton
+ Left = 171
+ Height = 31
+ Top = 160
+ Width = 94
+ Caption = 'Decrypt'
+ OnClick = btnDecryptClick
+ TabOrder = 3
+ end
+ object ProgressBar1: TProgressBar
+ Left = 459
+ Height = 25
+ Top = 104
+ Width = 231
+ TabOrder = 4
+ end
+ object Label3: TLabel
+ Left = 460
+ Height = 20
+ Top = 132
+ Width = 44
+ Caption = 'Label3'
+ end
+ object strsorg: TLabeledEdit
+ Left = 21
+ Height = 28
+ Top = 261
+ Width = 350
+ EditLabel.Height = 20
+ EditLabel.Width = 350
+ EditLabel.Caption = 'stringa sorgente'
+ TabOrder = 5
+ end
+ object strdest: TLabeledEdit
+ Left = 21
+ Height = 28
+ Top = 320
+ Width = 350
+ EditLabel.Height = 20
+ EditLabel.Width = 350
+ EditLabel.Caption = 'stringa destinazione'
+ TabOrder = 6
+ end
+ object btnDecrypt1: TButton
+ Left = 174
+ Height = 31
+ Top = 370
+ Width = 94
+ Caption = 'Decrypt'
+ OnClick = btnDecrypt1Click
+ TabOrder = 7
+ end
+ object btnEncrypt1: TButton
+ Left = 20
+ Height = 31
+ Top = 370
+ Width = 94
+ Caption = 'Encrypt'
+ OnClick = btnEncrypt1Click
+ TabOrder = 8
+ end
+ object Cipher: TDCP_3des
+ Id = 24
+ Algorithm = '3DES'
+ MaxKeySize = 192
+ OnProgress = CipherProgress
+ BlockSize = 64
+ Left = 650
+ Top = 20
+ end
+end
diff --git a/unit_crypt.pas b/unit_crypt.pas
new file mode 100644
index 0000000..30b4357
--- /dev/null
+++ b/unit_crypt.pas
@@ -0,0 +1,174 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+
+unit unit_crypt;
+
+{$MODE Delphi}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, DCPdes, Forms, Controls, Graphics, Dialogs,
+ EditBtn, StdCtrls, ComCtrls, ExtCtrls,dcpsha1, dcpsha256, DCPcrypt2,dcpsha512;
+
+type
+
+ { TForm_crypt }
+
+ TForm_crypt = class(TForm)
+ btnDecrypt1: TButton;
+ btnEncrypt: TButton;
+ btnDecrypt: TButton;
+ btnEncrypt1: TButton;
+ Cipher: TDCP_3des;
+ boxInputFile: TFileNameEdit;
+ boxOutputFile: TFileNameEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ strsorg: TLabeledEdit;
+ strdest: TLabeledEdit;
+
+ ProgressBar1: TProgressBar;
+ procedure btnDecrypt1Click(Sender: TObject);
+ procedure btnDecryptClick(Sender: TObject);
+ procedure btnEncrypt1Click(Sender: TObject);
+ procedure btnEncryptClick(Sender: TObject);
+ procedure CipherProgress(Sender: TObject; iCurrent, iMax: int64);
+ procedure FormCreate(Sender: TObject);
+ private
+ { private declarations }
+ public
+ { public declarations }
+ KeyStr: string;
+ end;
+
+var
+ Form_crypt: TForm_crypt;
+
+implementation
+
+{$R *.frm}
+
+{ TForm_crypt }
+
+procedure TForm_crypt.btnEncryptClick(Sender: TObject);
+var
+// Cipher: TDCP_rc4;
+
+ Source, Dest: TFileStream;
+ begin
+ //KeyStr:= '';
+ //if InputQuery('Passphrase','Enter passphrase',KeyStr) then // get the passphrase
+ //begin
+
+ try
+ Source:= TFileStream.Create(boxInputFile.Text, 0);
+ Dest:= TFileStream.Create(boxOutputFile.Text,fmCreate);
+ //Cipher:= TDCP_rc4.Create(Self);
+// Cipher.InitStr(KeyStr,TDCP_sha256); // initialize the cipher with a hash of the passphrase
+ Cipher.InitStr(KeyStr,TDCP_sha512); // initialize the cipher with a hash of the passphrase
+ Cipher.EncryptStream(Source,Dest,Source.Size); // encrypt the contents of the file
+ Cipher.Burn;
+// Cipher.Free;
+ Dest.Free;
+ Source.Free;
+// MessageDlg('Chiave registrata',mtInformation,[mbOK],0);
+ except
+ MessageDlg('File IO error',mtError,[mbOK],0);
+ end;
+ //end;
+ end;
+
+procedure TForm_crypt.CipherProgress(Sender: TObject; iCurrent, iMax: int64);
+begin
+ progressbar1.Min:=0;
+ progressbar1.Position:=icurrent;
+ progressbar1.Max:=imax;
+ label3.Caption:=inttostr(icurrent)+'/'+inttostr(imax);
+ application.ProcessMessages;
+
+end;
+
+procedure TForm_crypt.FormCreate(Sender: TObject);
+begin
+
+end;
+
+procedure TForm_crypt.btnDecryptClick(Sender: TObject);
+var
+// Cipher: TDCP_rc4;
+// KeyStr: string;
+ Source, Dest: TFileStream;
+ begin
+ // KeyStr:= '';
+ //if InputQuery('Passphrase','Enter passphrase',KeyStr) then // get the passphrase
+ //begin
+ try
+ Source:= TFileStream.Create(boxInputFile.filename,fmOpenRead);
+ Dest:= TFileStream.Create(boxOutputFile.filename,fmCreate);
+// Cipher:= TDCP_rc4.Create(Self);
+// Cipher.InitStr(KeyStr,TDCP_sha256); // initialize the cipher with a hash of the passphrase
+ Cipher.InitStr(KeyStr,TDCP_sha512); // initialize the cipher with a hash of the passphrase
+ Cipher.DecryptStream(Source,Dest,Source.Size); // decrypt the contents of the file
+ Cipher.Burn;
+// Cipher.Free;
+ Dest.Free;
+ Source.Free;
+// MessageDlg('Chiave tradotta',mtInformation,[mbOK],0);
+ except
+ MessageDlg('File IO error',mtError,[mbOK],0);
+ end;
+ //end;
+ end;
+
+procedure TForm_crypt.btnDecrypt1Click(Sender: TObject);
+begin
+ try
+ //Cipher:= TDCP_rc4.Create(Self);
+// Cipher.InitStr(KeyStr,TDCP_sha256); // initialize the cipher with a hash of the passphrase
+ Cipher.InitStr(KeyStr,TDCP_sha512); // initialize the cipher with a hash of the passphrase
+ strdest.text:=Cipher.DecryptString(strsorg.Text);
+ Cipher.Burn;
+// Cipher.Free;
+// MessageDlg('Chiave decifrata',mtInformation,[mbOK],0);
+ except
+ MessageDlg('error',mtError,[mbOK],0);
+ end;
+end;
+
+procedure TForm_crypt.btnEncrypt1Click(Sender: TObject);
+begin
+ try
+ //Cipher:= TDCP_rc4.Create(Self);
+// Cipher.InitStr(KeyStr,TDCP_sha256); // initialize the cipher with a hash of the passphrase
+ Cipher.InitStr(KeyStr,TDCP_sha512); // initialize the cipher with a hash of the passphrase
+ strdest.text:=Cipher.EncryptString(strsorg.Text);
+ Cipher.Burn;
+// Cipher.Free;
+// MessageDlg('Chiave cifrata',mtInformation,[mbOK],0);
+ except
+ MessageDlg('error',mtError,[mbOK],0);
+ end;
+end;
+
+end.
+
diff --git a/unit_open.frm b/unit_open.frm
new file mode 100644
index 0000000..b4b24cb
--- /dev/null
+++ b/unit_open.frm
@@ -0,0 +1,40 @@
+object form_open: Tform_open
+ Left = 387
+ Height = 389
+ Top = 242
+ Width = 419
+ BorderStyle = bsNone
+ Caption = 'form_open'
+ ClientHeight = 389
+ ClientWidth = 419
+ DesignTimePPI = 120
+ OnClick = FormClick
+ OnCreate = FormCreate
+ LCLVersion = '7.7'
+ object FileListBox1: TFileListBox
+ Left = 50
+ Height = 241
+ Top = 110
+ Width = 295
+ Directory = 'C:\codetyphon\typhon\bin32'
+ FileType = [ftReadOnly, ftHidden]
+ ItemHeight = 0
+ Mask = '*.sd'
+ OnDblClick = FileListBox1DblClick
+ TabOrder = 0
+ end
+ object DirectoryEdit1: TDirectoryEdit
+ Left = 30
+ Height = 28
+ Top = 30
+ Width = 374
+ Directory = 'DirectoryEdit1'
+ ShowHidden = False
+ ButtonWidth = 29
+ NumGlyphs = 1
+ MaxLength = 0
+ TabOrder = 1
+ OnChange = DirectoryEdit1Change
+ Text = 'DirectoryEdit1'
+ end
+end
diff --git a/unit_open.pas b/unit_open.pas
new file mode 100644
index 0000000..2944bc3
--- /dev/null
+++ b/unit_open.pas
@@ -0,0 +1,115 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+unit unit_open;
+
+{$mode objfpc}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, FileCtrl,
+ EditBtn;
+
+type
+
+ { Tform_open }
+
+ Tform_open = class(TForm)
+ DirectoryEdit1: TDirectoryEdit;
+ FileListBox1: TFileListBox;
+ procedure DirectoryEdit1Change(Sender: TObject);
+ procedure FileListBox1DblClick(Sender: TObject);
+ procedure FormClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { private declarations }
+ public
+ { public declarations }
+ end;
+
+var
+ form_open: Tform_open;
+
+implementation
+uses umain,unit_crypt,fmreader,fmwriter;
+
+{$R *.frm}
+
+{ Tform_open }
+
+procedure Tform_open.FormCreate(Sender: TObject);
+begin
+ directoryedit1.Directory:=extractfilepath(paramstr(0));;
+end;
+
+procedure Tform_open.FileListBox1DblClick(Sender: TObject);
+begin
+ form1.AbZipOutline1.CloseArchive;
+
+ form1.arcname:=filelistbox1.FileName;
+
+ ReaderForm.cReaderFile:=filelistbox1.FileName;
+ ReaderForm.Button1Click(sender);
+// showmessage(ReaderForm.memData.Text);
+ if ReaderForm.memData.Lines.Count>0 then begin
+ if ReaderForm.memData.Lines[0] = 'DataLck' then begin
+ showmessage('Cartella con sigillo DataLock');
+// showmessage('Rimuovo il sigillo DataLock prima di decifrarlo');
+ WriterForm.cReaderFile:=filelistbox1.FileName;
+ WriterForm.btnDeleteClick(sender);
+
+ form_crypt.boxInputFile.FileName:=form1.arcname;
+ form_crypt.boxOutputFile.FileName:=form1.arcname+'x';
+ form_crypt.btnDecryptClick(sender);
+ if fileexists(form_crypt.boxOutputFile.FileName) then begin
+ deletefile(form_crypt.boxInputFile.FileName);
+ renamefile(form_crypt.boxOutputFile.FileName, form_crypt.boxInputFile.FileName);
+ end;
+ end;
+ end
+ else begin
+ showmessage('Cartella priva del sigillo DataLock, nessuna garanzia di recupero dei dati');
+ showmessage('Si consiglia di apporre sigillo DataLock sempre quando si chiude una cartella');
+
+ end;
+
+ form1.AbZipOutline1.BaseDirectory:=filelistbox1.Directory;
+ form1.AbZipOutline1.FileName:=filelistbox1.FileName;
+// form1.AbZipOutline1.Password:='123456';
+// showmessage('Password della cartella: '+form1.AbZipOutline1.Password);;
+
+// showmessage(filelistbox1.FileName);
+ form1.LayoutOpen(sender);
+end;
+
+procedure Tform_open.FormClick(Sender: TObject);
+begin
+
+end;
+
+procedure Tform_open.DirectoryEdit1Change(Sender: TObject);
+begin
+ filelistbox1.Directory:=directoryedit1.Directory;
+ filelistbox1.UpdateFileList;
+end;
+
+end.
+
diff --git a/unit_pin.frm b/unit_pin.frm
new file mode 100644
index 0000000..817d01d
--- /dev/null
+++ b/unit_pin.frm
@@ -0,0 +1,53 @@
+object FormPin: TFormPin
+ Left = 0
+ Height = 92
+ Top = 0
+ Width = 454
+ BorderStyle = bsToolWindow
+ Caption = 'PIN'
+ ClientHeight = 92
+ ClientWidth = 454
+ Color = clForm
+ DesignTimePPI = 120
+ OnShow = FormShow
+ Position = poMainFormCenter
+ LCLVersion = '7.7'
+ object Panel5: TPanel
+ Left = 0
+ Height = 92
+ Top = 0
+ Width = 224
+ Align = alLeft
+ BevelOuter = bvNone
+ Caption = 'DataLock'
+ Color = 5263440
+ Font.Color = clYellow
+ Font.Height = -30
+ Font.Name = 'Tahoma'
+ ParentColor = False
+ ParentFont = False
+ TabOrder = 0
+ end
+ object Button1: TButton
+ Left = 376
+ Height = 39
+ Top = 28
+ Width = 56
+ Caption = 'Ok'
+ ModalResult = 1
+ TabOrder = 1
+ end
+ object pwd: TEdit
+ Left = 256
+ Height = 39
+ Hint = 'Insert PIN'
+ Top = 28
+ Width = 100
+ EchoMode = emPassword
+ Font.Height = -23
+ OnKeyDown = pwdKeyDown
+ ParentFont = False
+ PasswordChar = '*'
+ TabOrder = 2
+ end
+end
diff --git a/unit_pin.pas b/unit_pin.pas
new file mode 100644
index 0000000..f8640f4
--- /dev/null
+++ b/unit_pin.pas
@@ -0,0 +1,69 @@
+(*
+ DataLock is a Tool for data protection
+ Copyright (C) 2022 Rino Russo
+ https://www.rinorusso.it
+
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*)
+
+
+unit unit_pin;
+
+{$mode ObjFPC}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
+ MaskEdit;
+
+type
+
+ { TFormPin }
+
+ TFormPin = class(TForm)
+ Button1: TButton;
+ pwd: TEdit;
+ Panel5: TPanel;
+ procedure FormShow(Sender: TObject);
+ procedure pwdKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+ private
+
+ public
+
+ end;
+
+var
+ FormPin: TFormPin;
+
+implementation
+
+{$R *.frm}
+
+{ TFormPin }
+
+procedure TFormPin.FormShow(Sender: TObject);
+begin
+ pwd.SetFocus;
+end;
+
+procedure TFormPin.pwdKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
+ );
+begin
+ if Key = 13 then modalresult:=mrOk; // chiude il form e valida il pin
+end;
+
+end.
+