-
Notifications
You must be signed in to change notification settings - Fork 2
/
uFactoryManifesto.pas
58 lines (46 loc) · 971 Bytes
/
uFactoryManifesto.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
unit uFactoryManifesto;
interface
uses DmdConnection, uManifesto;
type
IManifesto = Interface(IInterface)
['{932DC18E-83E8-4FB2-8F22-EC35AE8F3FCE}']
function AbreFormulario : IManifesto;
end;
TManifesto = class(TInterfacedObject, IManifesto)
private
FCon : TDMConection;
FfrmManifesto : TfrmManifesto;
public
constructor create;
destructor destroy; override;
class function New : IManifesto;
function AbreFormulario : IManifesto;
end;
implementation
{ TManifesto }
function TManifesto.AbreFormulario: IManifesto;
begin
FCon := TDMConection.Create(nil);
try
FfrmManifesto := TfrmManifesto.Create(nil);
try
FfrmManifesto.ShowModal;
finally
FfrmManifesto.Free;
end;
finally
FCon.Free;
end;
end;
constructor TManifesto.create;
begin
end;
destructor TManifesto.destroy;
begin
inherited;
end;
class function TManifesto.New: IManifesto;
begin
Result := Self.Create;
end;
end.