-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_record.pas
More file actions
46 lines (35 loc) · 831 Bytes
/
Copy pathconfig_record.pas
File metadata and controls
46 lines (35 loc) · 831 Bytes
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
unit config_record;
{$mode ObjFPC}{$H+}
interface
uses
Classes, SysUtils, AppSettings;
type
{ Project settings.
Saved and restored from INI file by TAppSettings class.
}
TAppConfig = record
str1: String;
str2: String;
int1: Integer;
int2: Integer;
int3: Integer;
int4: Integer;
top: Integer;
left: Integer;
num1: Double;
bool1: Boolean;
end;
// init user defined setting entries
procedure InitConfigVariables;
var
Settings: TAppSettings; // class for work with settings
cfg: TAppConfig; // configuration record with project settings
implementation
procedure InitConfigVariables;
begin
Settings.Add('main.top', stInt, @cfg.top);
Settings.Add('main.left', stInt, @cfg.left);
end;
initialization
Settings := TAppSettings.Create;
end.