-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathockpathsutils.pas
88 lines (70 loc) · 1.51 KB
/
ockpathsutils.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
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
80
81
82
83
84
85
86
87
unit OckPathsUtils;
{$mode Delphi}
interface
uses
Classes, SysUtils;
type
TPaths = class
FKioskApp: string;
FConfFile: string;
FCustomIcons: string;
FCustomScreenShots: string;
FCustomSettings: string;
FCustomSkin: string;
end;
{ TPathsOnDepot }
TPathsOnDepot = class(TPaths)
private
FShare: string;
procedure SetShare(theShare: string);
public
procedure SetDepotPaths; virtual; abstract;
property Share: string read FShare write SetShare;
end;
TPathsOnClient = class(TPaths)
public
FDefaultSettings: string;
FDefaultIcons: string;
FDefaultSkin: string;
FAdminMode: boolean;
procedure SetAdminMode(theAdminMode: boolean); virtual;
procedure SetUserModePaths; virtual; abstract;
procedure SetAdminModePaths; virtual; abstract;
procedure InitPaths;
constructor Create; virtual;
destructor Destroy; override;
property AdminMode: boolean read FAdminMode write SetAdminMode;
end;
implementation
{ TPathsOnDepot }
procedure TPathsOnDepot.SetShare(theShare: string);
begin
FShare := theShare;
SetDepotPaths;
end;
procedure TPathsOnClient.SetAdminMode(theAdminMode: boolean);
begin
FAdminMode := theAdminMode;
InitPaths;
end;
procedure TPathsOnClient.InitPaths;
begin
if FAdminMode then
begin
SetAdminModePaths;
end
else
begin
SetUserModePaths;
end;
end;
constructor TPathsOnClient.Create;
begin
inherited Create;
InitPaths;
end;
destructor TPathsOnClient.Destroy;
begin
inherited Destroy;
end;
end.