-
Notifications
You must be signed in to change notification settings - Fork 1
/
untMain.~pas
52 lines (35 loc) · 1.1 KB
/
untMain.~pas
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
unit untMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, untVariables, untSettings, untGenericProcedures, ComCtrls;
type
TfrmMain = class(TForm)
StatusBar: TStatusBar;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
//---------------------------------------------------------on the very beginning
procedure TfrmMain.FormCreate(Sender: TObject);
begin
currentDir:=ExtractFileDir(paramstr(0));
currentIni:=currentDir+'\'+iniName;
currentLog:=currentDir+'\'+logName;
LoadSettings(currentIni);
addToLog(currentLog, 'Application started.');
end;
//---------------------------------------------------------------on the very end
procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
SaveSettings(currentIni);
addToLog(currentLog, 'Application closed.');
end;
end.