@@ -46,8 +46,15 @@ Root: HKLM; Subkey: "Software\Red Hat\{#AppName}"; ValueType: string; ValueName:
4646
4747[Code]
4848
49+ type
50+ ComponentEntry = record
51+ Container: TPanel;
52+ Content: TPanel;
53+ end ;
54+
4955var
5056 AuthPageID: Integer;
57+ ComponentPageID: Integer;
5158 AuthLabel: TNewStaticText;
5259 StdColor: TColor;
5360
@@ -163,9 +170,108 @@ begin
163170 result := Page;
164171end ;
165172
173+ function createComponentEntry (Page: TWizardPage; Top: integer; ComponentName: String; ComponentVersion: String;
174+ ComponentDescription: String; ContentHeight: integer): ComponentEntry;
175+ var
176+ Panel, PanelHeader, PanelContent: TPanel;
177+ NameLabel, VersionLabel, DescriptionLabel: TNewStaticText;
178+ begin
179+ Panel := TPanel.Create(Page);
180+ Panel.Parent := Page.Surface;
181+ Panel.Top := Top;
182+ Panel.BorderStyle := bsNone;
183+ Panel.Color := StringToColor(' $d3d3d3' );
184+ Panel.Width := 840 ;
185+ Panel.Height := ContentHeight + 40 ;
186+ Panel.BevelInner := bvNone;
187+ Panel.BevelOuter := bvNone;
188+
189+ PanelHeader := TPanel.Create(Page);
190+ PanelHeader.Parent := Panel;
191+ PanelHeader.Top := 1 ;
192+ PanelHeader.Left := 1 ;
193+ PanelHeader.BorderStyle := bsNone;
194+ PanelHeader.Color := StringToColor(' $f6f6f6' );
195+ PanelHeader.Width := 838 ;
196+ PanelHeader.Height := 39 ;
197+ PanelHeader.BevelInner := bvNone;
198+ PanelHeader.BevelOuter := bvNone;
199+
200+ NameLabel := TNewStaticText.Create(Page);
201+ NameLabel.Caption := ComponentName;
202+ NameLabel.Parent := PanelHeader;
203+ NameLabel.Left := 12 ;
204+ NameLabel.Top := 2 ;
205+ NameLabel.Font.Size := 11 ;
206+ NameLabel.Font.Color := StringToColor(' $cc0000' );
207+ NameLabel.Font.Style := NameLabel.Font.Style + [fsBold];
208+
209+ VersionLabel := TNewStaticText.Create(Page);
210+ VersionLabel.Caption := ComponentVersion;
211+ VersionLabel.Parent := PanelHeader;
212+ VersionLabel.Left := NameLabel.Left + NameLabel.Width + ScaleX(4 );
213+ VersionLabel.Top := 8 ;
214+ VersionLabel.Font.Size := 7 ;
215+ VersionLabel.Font.Color := StringToColor(' $797979' );
216+
217+ DescriptionLabel := TNewStaticText.Create(Page);
218+ DescriptionLabel.Caption := ComponentDescription;
219+ DescriptionLabel.Parent := PanelHeader;
220+ DescriptionLabel.Left := 12 ;
221+ DescriptionLabel.Top := NameLabel.Top + NameLabel.Height + ScaleY(2 );
222+ DescriptionLabel.Font.Size := 7 ;
223+ DescriptionLabel.Font.Color := StringToColor(' $797979' );
224+
225+ PanelContent := TPanel.Create(Page);
226+ PanelContent.Parent := Panel;
227+ PanelContent.Top := 41 ;
228+ PanelContent.Left := 1 ;
229+ PanelContent.BorderStyle := bsNone;
230+ PanelContent.Color := clWhite;
231+ PanelContent.Width := 838 ;
232+ PanelContent.Height := ContentHeight - 2 ;
233+ PanelContent.BevelInner := bvNone;
234+ PanelContent.BevelOuter := bvNone;
235+
236+ Result.Container := Panel;
237+ Result.Content := PanelContent;
238+ end ;
239+
240+ // Create the welcome page - this page allows the user to log in to their Red Hat account
241+ function createComponentPage : TWizardPage;
242+ var
243+ Page: TWizardPage;
244+ HeadingLabel: TNewStaticText;
245+ Entry: ComponentEntry;
246+ begin
247+ Page := CreateCustomPage(AuthPageID, ' ' , ' ' );
248+
249+ // The page has a unique id, we store it in the AuthPageID variable here so that we can refer to it elsewhere
250+ ComponentPageID := Page.ID;
251+
252+ // Create the heading label for the component selection list
253+ HeadingLabel := TNewStaticText.Create(Page);
254+ HeadingLabel.Caption := ' Select the products and tools you want to install.' ;
255+ HeadingLabel.Parent := Page.Surface;
256+ HeadingLabel.Font.Size := 8 ;
257+
258+ Entry := createComponentEntry(Page, HeadingLabel.Top + HeadingLabel.Height + ScaleY(8 ),
259+ ' RED HAT ENTERPRISE LINUX ATOMIC PLATFORM' , ' v2.0' ,
260+ ' Host Linux containers in a minimal version of Red Hat Enterprise Linux.' , 80 );
261+
262+ Entry := createComponentEntry(Page, Entry.Container.Top + Entry.Container.Height + ScaleY(8 ),
263+ ' RED HAT JBOSS DEVELOPER STUDIO' , ' v9.0' ,
264+ ' An IDE with tooling that will help you easily code, test, and deploy your projects.' , 60 );
265+
266+ Entry := createComponentEntry(Page, Entry.Container.Top + Entry.Container.Height + ScaleY(8 ),
267+ ' RED HAT OPENSHIFT ENTERPRISE' , ' v3.0' ,
268+ ' DevOps tooling that helps you easily build and deploy your projects in a PaaS environment.' , 40 );
269+ end ;
270+
166271procedure CreateWizardPages ;
167272begin
168273 createWelcomePage;
274+ createComponentPage;
169275
170276
171277end ;
@@ -449,10 +555,17 @@ begin
449555 WizardForm.PageNameLabel.Visible := False;
450556 WizardForm.PageDescriptionLabel.Visible := False;
451557
452- WizardForm.OuterNotebook.Width := 800 ;
453- WizardForm.InnerPage.Width := 800 ;
558+ WizardForm.OuterNotebook.Width := 880 ;
559+ WizardForm.OuterNotebook.Height := 460 ;
560+
561+ WizardForm.InnerNotebook.Width := 880 ;
562+ WizardForm.InnerNotebook.Height := 460 ;
563+
564+ // Set the width of the top panel
565+ WizardForm.MainPanel.Width := 920 ;
566+ // WizardForm.MainPanel.Color := clGreen;
567+
454568
455- WizardForm.MainPanel.Width := 800 ;
456569 WizardForm.WizardSmallBitmapImage.Visible := false;
457570
458571 BitmapFileName := ExpandConstant(' {tmp}\bc1.bmp' );
0 commit comments