forked from idursun/delphipi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PageBase.pas
62 lines (50 loc) · 1.45 KB
/
PageBase.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
{**
DelphiPI (Delphi Package Installer)
Author : ibrahim dursun (ibrahimdursun gmail)
License : GNU General Public License 2.0
**}
unit PageBase;
interface
uses
CompilationData, Windows, Messages, SysUtils, Variants, Classes, Graphics, Vcl.Controls, Forms,
Dialogs, WizardIntfs;
type
TWizardPage = class(TForm)
private
function GetWizardController: IWizard;
procedure SetWizardController(const Value: IWizard);
protected
fWizardController: IWizard;
fCompilationData: TCompilationData;
public
constructor Create(Owner: TComponent; const compilationData: TCompilationData); reintroduce; virtual;
procedure UpdateWizardState; virtual;
function CanShowPage: Boolean; virtual;
property Wizard: IWizard read GetWizardController write SetWizardController;
end;
TPageClass = class of TWizardPage;
implementation
uses FormWizard;
{$R *.dfm}
function TWizardPage.CanShowPage: Boolean;
begin
Result := true;
end;
constructor TWizardPage.Create(Owner: TComponent; const compilationData: TCompilationData);
begin
inherited Create(Owner);
fCompilationData := compilationData;
end;
function TWizardPage.GetWizardController: IWizard;
begin
Result := TFrmWizard.Wizard;
end;
procedure TWizardPage.SetWizardController(const Value: IWizard);
begin
fWizardController := Value;
end;
procedure TWizardPage.UpdateWizardState;
begin
Assert(Assigned(Wizard));
end;
end.