1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
unit logpathUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Buttons,
ExtCtrls, process;
type
{ TlogpathForm }
TlogpathForm = class(TForm)
changepathCheckBox: TCheckBox;
SavecheckImage: TImage;
setpathBitBtn: TBitBtn;
homepathEdit: TEdit;
pathLabel: TLabel;
procedure changepathCheckBoxChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure setpathBitBtnClick(Sender: TObject);
private
public
end;
var
logpathForm: TlogpathForm;
destinationfolder: string;
implementation
{$R *.lfm}
{ TlogpathForm }
//Utilize overlayUnit in order know variable userhomepathSTR
uses overlayunit;
procedure TlogpathForm.FormCreate(Sender: TObject);
begin
//Centralize window
Left:=(Screen.Width-Width) div 2;
Top:=(Screen.Height-Height) div 2;
// Use Home path variable in Logging default Path
logpathForm.homepathEdit.Text:=userhomepathSTR;
end;
procedure TlogpathForm.changepathCheckBoxChange(Sender: TObject);
begin
if changepathCheckbox.Checked=true then
begin
homepathEdit.Enabled:=true;
setpathBitBtn.Enabled:=true;
end
else
begin
homepathEdit.Enabled:=false;
setpathBitBtn.Enabled:=false
end;
end;
procedure TlogpathForm.setpathBitBtnClick(Sender: TObject);
begin
//Store path in variable
destinationfolder := homepathEdit.Text;
SavecheckImage.Visible:=true;
logpathForm.Close;
end;
end.
|