Ветеран
Сообщения: 863
Благодарности: 262
|
Профиль
|
Отправить PM
| Цитировать
Цитата Kashtan007:
Одна внизу при нажатии кнопки, вторая на странице Components. »
|
Как-то так:
читать дальше »
Код: 
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Languages]
Name: "RU"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
Source: "compiler:Languages\Russian.isl"; DestDir: "{app}"; DestName: "TextRussian.isl"; Check: IsComponent(1)
Source: "compiler:Default.isl"; DestDir: "{app}"; DestName: "TextEnglish.isl"; Check: IsComponent(2)
Source: "compiler:Languages\Russian.isl"; DestDir: "{app}"; DestName: "VoiceRussian.isl"; Check: IsComponent(4)
Source: "compiler:Default.isl"; DestDir: "{app}"; DestName: "VoiceEnglish.isl"; Check: IsComponent(5)
[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: text; Description: Дополнительное по; Types: full;
Name: text\DirectX; Description: DirectX 9;
Name: text\Visual; Description: Microsoft Visual C++;
[CustomMessages]
RU.CompSubtitlesLng=Язык субтитров
RU.CompVoiceLng=Язык озвучки
RU.CompRussian=Русский
RU.CompEnglish=Английский
[ code]
var
Flag: Boolean;
SettingButton: TButton;
ComponentsPage: TWizardPage;
SelectComponentsLabel: TNewStaticText;
ComponentsList: TNewCheckListBox;
procedure HideShowOnClick(Sender: TObject);
begin
if Flag = False then begin
WizardForm.ClientWidth:= ScaleX(497);
WizardForm.ClientHeight:= ScaleY(360);
Flag:= True;
SettingButton.Caption:= '[]';
end else begin
WizardForm.ClientWidth:= ScaleX(497);
WizardForm.ClientHeight:= ScaleY(450);
Flag:= False;
SettingButton.Caption:= '[]';
end;
end;
procedure RedesignWizardForm;
begin
SelectComponentsLabel := TNewStaticText.Create(WizardForm);
with SelectComponentsLabel do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(0), ScaleY(0), ScaleX(417), ScaleY(42));
AutoSize := False;
WordWrap := True;
Caption := SetupMessage(msgSelectComponentsLabel2);
end;
ComponentsList := TNewCheckListBox.Create(WizardForm);
with ComponentsList do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(0), ScaleY(61), ScaleX(417), ScaleY(169));
AddCheckBox(CustomMessage('CompSubtitlesLng'), '', 0, True, False, False, True, nil);
AddRadioButton(CustomMessage('CompRussian'), '', 1, True, True, nil);
AddRadioButton(CustomMessage('CompEnglish'), '', 1, False, True, nil);
AddCheckBox(CustomMessage('CompVoiceLng'), '', 0, True, False, False, True, nil);
AddRadioButton(CustomMessage('CompRussian'), '', 1, True, True, nil);
AddRadioButton(CustomMessage('CompEnglish'), '', 1, False, True, nil);
end;
end;
function IsComponent(CompIndex: Integer): Boolean;
var
i: Integer;
begin
Result := False;
for i := 0 to ComponentsList.ItemCount - 1 do
begin
if CompIndex <= (ComponentsList.ItemCount - 1) then
Result := ComponentsList.Checked[CompIndex];
end;
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
SettingButton:= TButton.Create(WizardForm);
SettingButton.SetBounds(ScaleX(10),ScaleY(325), ScaleX(30), ScaleY(30))
SettingButton.Caption:= '[]';
SettingButton.OnClick:= @HideShowOnClick;
SettingButton.Parent:= WizardForm;
Flag:=True;
with WizardForm do begin
ComponentsList.Parent:= WizardForm;
WizardForm.ComponentsList.Checked[1]:=True
WizardForm.ComponentsList.Checked[2]:=True
WizardForm.ComponentsList.Top := ScaleY(370);
WizardForm.ComponentsList.Height := ScaleY(55);
WizardForm.ComponentsList.Left := ScaleY(40);
WizardForm.ComponentsList.Color := clMenu;
end;
end;
|