Delphi TDownloadURL.AfterDownload的正确参数列表是什么
如何分配iDownloadURL.AfterDownload:=AfterDownloadLicense;TNotifyEvent?您可以在中查找,甚至可以使用IDE编辑器在Delphi TDownloadURL.AfterDownload的正确参数列表是什么,delphi,delphi-xe4,Delphi,Delphi Xe4,如何分配iDownloadURL.AfterDownload:=AfterDownloadLicense;TNotifyEvent?您可以在中查找,甚至可以使用IDE编辑器在System.Classes.pas中查找TNotifyEvent声明: { Download the license file with expiration date } iDownloadURL := TDownloadURL.Create(nil); try iBaseURL := DomainNam
System.Classes.pas中查找TNotifyEvent
声明:
{ Download the license file with expiration date }
iDownloadURL := TDownloadURL.Create(nil);
try
iBaseURL := DomainName1.Text;
iDownloadURL.FileName := ATempFilesFolder + UserName1.Text + 'lcn';
iDownloadURL.url := iBaseURL;
iDownloadURL.OnDownloadProgress := URL_OnDownloadProgress;
iDownloadURL.AfterDownload := AfterDownloadLicense; {License is validated here }
iDownloadURL.ExecuteTarget(nil);
finally
{ If a connection fails then a dialog will appear that shows an error.
If running in the ide then an exception box will appear, Press the continue
button... then the message will be shown }
iDownloadURL.Free;
StatusBar1.SimpleText := 'Failed validation connection...';
Form1.StatusBar1.SimpleText := 'Failed validation connection...';
end;
procedure TFormDomainSettings.AfterDownloadLicense;
begin
if not FileExists(ATempFilesFolder + UserName1.Text + 'lcn') then
begin
TaskMessageDlg('Error Downloading License File',
'The license file could not be downloaded.', mtWarning, [mbOk], 0);
end
else
begin
ValidateLicense;
end;
end;
话虽如此,AfterDownloadLicense()
需要如下所示:
TNotifyEvent = procedure(Sender: TObject) of object;
很抱歉我想我早就试过了,但它无法编译。
procedure TFormDomainSettings.AfterDownloadLicense(Sender: TObject);