Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Аватара для habib2302

Ветеран


Сообщения: 855
Благодарности: 101

Профиль | Отправить PM | Цитировать


nik1967, в curPageChanged можно добавить только для финишной страницы. А как быть с cancel page?

module\page.iss
procedure CurPageChanged(CurPageID: integer);
begin
#ifdef WinTB
case CurPageID of
wpWelcome: begin
TaskBarButtonEnabled(hback, false);
end;
wpSelectDir: begin
TaskBarButtonEnabled(hback, true);
TaskBarButtonImage(hnext, hImg2, IMAGE_ICON);
end;
wpInstalling: begin
TaskBarButtonEnabled(hback, false);
TaskBarButtonEnabled(hnext, false);
end;
wpFinished: begin
TaskBarButtonEnabled(hnext, true);
TaskBarButtonEnabled(hcancel, false);
end;
end;
#endif
if CurPageID=wpWelcome then begin
HideComponents;
Bevel2.show;
Bevel3.show;


TextLabel[6].show;
TextLabel[1].show;
WizardForm.BackButton.Caption:= CustomMessage(lang+'ButtonBack');
WizardForm.CancelButton.Caption:= CustomMessage(lang+'ButtonCancel');
WizardForm.NextButton.Caption:= CustomMessage(lang+'Buttonnext');
Background.Show;
WizardForm.CancelButton.Left:=ScaleX(5332);
end;

#ifdef InfoBefore
if CurPageID=wpInfoBefore then begin
HideComponents;
WizardForm.BackButton.Caption:= CustomMessage(lang+'ButtonBack');
WizardForm.CancelButton.Caption:= CustomMessage(lang+'ButtonCancel');
WizardForm.NextButton.Caption:= CustomMessage(lang+'Buttonnext');
TextLabel[38].show;
TextLabel[39].show;
WizardForm.InfoBeforeMemo.Show;
TextLabel[40].show;
Bevel3.Show;
Bevel2.Show;
Bevel4.Show;
Bevel5.Show;
Bevel6.Show;
Bevel7.Show;
Bevel8.Show;
WizardForm.Bevel1.Show;
WizardForm.Bevel1.SetBounds(0,90,WizardForm.ClientWidth,2);
end;
#endif

if CurPageID=wpSelectcomponents then begin
HideComponents;
case ActiveLanguage of
'eng': Application.Title := 'Setup —- « {#GameName} »';
'rus': Application.Title := 'Óñòàíîâêà —- « {#GameName} »';
end;
TextLabel[26].show;
WizardForm.BackButton.Caption:= CustomMessage(lang+'ButtonBack');
WizardForm.CancelButton.Caption:= CustomMessage(lang+'ButtonCancel');
WizardForm.NextButton.Caption:= CustomMessage(lang+'ButtonInstall');
WizardForm.SelectComponentsLabel.show;
//TextLabel[2].show;
TextLabel[7].Show;
Bevel3.Show;
Bevel2.Show;
Background.Hide
Bevel4.Show;
Bevel5.Show;
Bevel6.Show;
Bevel7.Show;
Bevel8.Show;
TextLabel[28].show;
WizardForm.CancelButton.Left:=ScaleX(5332);
WizardForm.Bevel1.Show;
WizardForm.Bevel1.SetBounds(0,90,WizardForm.ClientWidth,2);
WizardForm.ComponentsList.Show;
end;
//-------- Second Page --------\\
if CurPageID=wpSelectDir then begin
HideComponents;
case ActiveLanguage of
'eng': Application.Title := 'Setup —- « {#GameName} »';
'rus': Application.Title := 'Óñòàíîâêà —- « {#GameName} »';
end;
TextLabel[13].show;
TextLabel[29].show;
TextLabel[8].show;
TextLabel[2].show;
TextLabel[14].show;
TextLabel[15].show;
TextLabel[16].show;
TextLabel[17].show;
TextLabel[18].show;
TextLabel[19].show;
TextLabel[20].show;
TextLabel[21].show;
TextLabel[22].show;
WizardForm.CancelButton.Left:=ScaleX(5332);
WizardForm.BackButton.Caption:= CustomMessage(lang+'ButtonBack');
WizardForm.CancelButton.Caption:= CustomMessage(lang+'ButtonCancel');
WizardForm.NextButton.Caption:= CustomMessage(lang+'Buttonnext');
Bevel3.Show;
Bevel2.Show;
Background.hide;
Bevel4.Show;
Bevel5.Show;
Bevel6.Show;
bevel7.Show;
Bevel8.Show;
WizardForm.GroupBrowseButton.Show;
WizardForm.GroupEdit.Show;
WizardForm.DirEdit.Show;
WizardForm.SelectDirLabel.Show;
WizardForm.DirBrowseButton.Show;
GetFreeSpaceCaption(nil);
end;
if CurPageID=wpInstalling then begin
HideComponents;

TextLabel[33].hide;
TextLabel[11].show;
TextLabel[12].show;
TextLabel[3].show;
PauseButton1.show;
WizardForm.CancelButton.Caption:= CustomMessage(lang+'ButtonCancel');
TextLabel[30].show;
Bevel3.Show;
Bevel2.Show;
wizardform.cancelbutton.show;
TextLabel[9].show;
Bevel4.Show;
Bevel5.Show;
Bevel6.Show;
Bevel6.Height:=210;
WizardForm.ProgressGauge.Show;
WizardForm.StatusLabel.Show;
WizardForm.CancelButton.Hide;
WizardForm.CancelButton.Left:=WizardForm.NextButton.Left;
CompactButton.Show;
end;
//--------Game was successfully installed PAGE--------\\
if CurPageID=wpFinished then begin
#ifdef WinTB
WintbStart();
#endif

#ifdef WinTB
Win6TaskBarV1_2(WizardForm.Handle, MainForm.Handle, 0);
#endif
case ActiveLanguage of
'eng': Application.Title := 'Setup —- « {#GameName} »';
'rus': Application.Title := 'Óñòàíîâêà —- « {#GameName} »';
end;
with WizardForm do
begin
AutoScroll := False;
ClientHeight := ScaleY(411);
ClientWidth := ScaleX(584);
Position := poScreenCenter;
lPLogo:= ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\logo.png'), ScaleX(214), ScaleY(368), ScaleX(158), ScaleY(37), True, True);
ImgApplyChanges(WizardForm.Handle);
end;
WizardForm.NextButton.Caption:= CustomMessage(lang+'Buttonfinish');
with langBtn do
begin
Height := ScaleY(30);
Left := ScaleX(5);
Top := ScaleY(372);
Width := ScaleX(31)
OnClick:= @LangBtnClick;
Parent:= WizardForm;
end;
HideComponents;
TextLabel[5].show;
TextLabel[10].show;
Bevel2.Show;
Bevel3.Show;
Background.Show;
Runbtn.show;
end;

//--------Game Fail To Install PAGE--------\\
if (CurPageID = wpFinished) and (ISDoneError=True) then
begin
case
ActiveLanguage of
'eng': Application.Title := 'Setup —- « {#GameName} »';
'rus': Application.Title := 'Óñòàíîâêà —- « {#GameName} »';
end;
#ifdef WinTB
SetTaskBarProgressState(TBPF_ERROR);
WintbStart();
Win6TaskBarV1_2(WizardForm.Handle, MainForm.Handle, 0);
#endif
Runbtn.hide;
WizardForm.NextButton.Caption:= CustomMessage(lang+'Buttonfinish');
with langBtn do
begin
Height := ScaleY(30);
Left := ScaleX(5);
Top := ScaleY(372);
Width := ScaleX(31)
OnClick:= @LangBtnClick;
Parent:= WizardForm;
end;
with WizardForm do
begin
AutoScroll := False;
ClientHeight := ScaleY(411);
ClientWidth := ScaleX(584);
Position := poScreenCenter;
lPLogo:= ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\logo.png'), ScaleX(214), ScaleY(368), ScaleX(158), ScaleY(37), True, True);
ImgApplyChanges(WizardForm.Handle);
end;
HideComponents;
TextLabel[4].show;
TextLabel[10].show;
Bevel2.Show;
Bevel3.Show;
Background.Show;
end;
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
if
(PageID=wpSelectProgramGroup) then Result:=true;
end;

-------
Помог? От "Полезное сообщение" не откажусь!!!


Последний раз редактировалось habib2302, 13-12-2019 в 12:29.


Отправлено: 12:15, 13-12-2019 | #416