【发布时间】:2022-06-13 13:53:59
【问题描述】:
假设我正在使用示例CodeDownloadFiles.iss,我想通知用户下载状态写入进度文件下载的数量“N of Y 文件”。 p>
我想检索所选组件的总数,但如何更改标签“正在下载其他文件...”?我尝试了以下命令,但该类不支持它:
TDownloadWizardPage.DownloadingLabel := 'Downloading additional files... file 1 of 3, please wait...'
这是函数,你可以看到我没有写如何检索所选组件的总数;我会很感激得到这个任务的建议以编程方式检索它......也许创建一个检查任何组件的新函数? :
function NextButtonClick(CurPageID: Integer): Boolean;
begin
//Download Components
if CurPageID = wpReady then begin
DownloadPage.Clear;
if WizardIsComponentSelected('Database\ABC') then begin
TDownloadWizardPage.DownloadingLabel := 'Downloading additional files... file 1 of 3, please wait...'
DownloadPage.Add('https://example.com/MyDB1.sqlite', 'MyDB1.sqlite', '');
end;
if WizardIsComponentSelected('Database\DEF') then begin
TDownloadWizardPage.DownloadingLabel := 'Downloading additional files... file 2 of 3, please wait...'
DownloadPage.Add('https://example.com/MyDB2.sqlite', 'MyDB2.sqlite', '');;
end;
if WizardIsComponentSelected('Database\GHI') then begin
TDownloadWizardPage.DownloadingLabel := 'Downloading additional files... file 3 of 3, please wait...'
DownloadPage.Add('https://example.com/MyDB3.sqlite', 'MyDB3.sqlite', '');;
end;
DownloadPage.Show;
try
try
DownloadPage.Download;
Result := True;
except
SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK);
Result := False;
end;
finally
DownloadPage.Hide;
end;
end else
Result := True;
end;
我该如何解决这个问题?我如何计算所选组件的总数?
感谢您的任何建议!
【问题讨论】: