Suppose that I'm using the example CodeDownloadFiles.iss and I would like to notice to the user the Status of Download writing the number of progress file download "N of Y file".
I thought to retrieve the Total Number of selected Components but how can change the label "Downloading additional files..."? I tried the following command but it is not supported by the class:
TDownloadWizardPage.DownloadingLabel := 'Downloading additional files... file 1 of 3, please wait...'
This is the function, as you can see I didn't write how to retrieve the Total Number of selected components; I'll appreciate getting a suggestion also for this task to retrieve it programmatically... maybe creating a New Function that checks any components? :
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;
How can I solve this problem? And how could I count the total number of selected components?
Thank you for any suggestions!