防止自动从 Installing 继续到 Finished 页面并允许返回到 Installing 页面以查看 Inno Setup 中的结果
Prevent automatic proceed from Installing to Finished page and allowing going back to the Installing page to review results in Inno Setup
这个问题是
的后续问题
我不知道此请求的后果,但是否可以像其他安装程序一样实现 后退/下一步 按钮?我知道它们只有在向导可见时才会起作用。我喜欢用户在继续之前有机会滚动文件列表的想法。
就像我说的,我不知道添加这样一个功能所涉及的复杂性。 Back 对我来说并不太重要。但是让 Next 可见(以及 Cancel)并在正确的时间启用会很好。
您可以在安装页面后添加一个自定义页面,当它被激活时,将所有安装页面内容移动到它:
var
AfterInstallPage: TWizardPage;
procedure InitializeWizard();
begin
AfterInstallPage :=
CreateCustomPage(wpInstalling, 'Installation done', 'Installation has completed');
// ...
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if (CurPageID = AfterInstallPage.ID) and
// Prevent re-adding "Done" to the ProgressListBox when revisiting the page
(ProgressListBox.Parent <> AfterInstallPage.Surface) then
begin
WizardForm.ProgressGauge.Parent := AfterInstallPage.Surface;
// prevent reanimating the progress
WizardForm.ProgressGauge.Position := WizardForm.ProgressGauge.Max - 1;
WizardForm.ProgressGauge.Position := WizardForm.ProgressGauge.Max;
ProgressListBox.Parent := AfterInstallPage.Surface;
WizardForm.StatusLabel.Parent := AfterInstallPage.Surface;
WizardForm.StatusLabel.Caption := 'Done.';
AddProgress('Done');
end;
end;
这个问题是
我不知道此请求的后果,但是否可以像其他安装程序一样实现 后退/下一步 按钮?我知道它们只有在向导可见时才会起作用。我喜欢用户在继续之前有机会滚动文件列表的想法。
就像我说的,我不知道添加这样一个功能所涉及的复杂性。 Back 对我来说并不太重要。但是让 Next 可见(以及 Cancel)并在正确的时间启用会很好。
您可以在安装页面后添加一个自定义页面,当它被激活时,将所有安装页面内容移动到它:
var
AfterInstallPage: TWizardPage;
procedure InitializeWizard();
begin
AfterInstallPage :=
CreateCustomPage(wpInstalling, 'Installation done', 'Installation has completed');
// ...
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if (CurPageID = AfterInstallPage.ID) and
// Prevent re-adding "Done" to the ProgressListBox when revisiting the page
(ProgressListBox.Parent <> AfterInstallPage.Surface) then
begin
WizardForm.ProgressGauge.Parent := AfterInstallPage.Surface;
// prevent reanimating the progress
WizardForm.ProgressGauge.Position := WizardForm.ProgressGauge.Max - 1;
WizardForm.ProgressGauge.Position := WizardForm.ProgressGauge.Max;
ProgressListBox.Parent := AfterInstallPage.Surface;
WizardForm.StatusLabel.Parent := AfterInstallPage.Surface;
WizardForm.StatusLabel.Caption := 'Done.';
AddProgress('Done');
end;
end;