Für das OnWork-Event müsste das so gehen:
Delphi-Quellcode:
TMyFtp = class (TIdFtp)
procedure DoWork(AWorkMode: TWorkMode; const ACount: Integer); override;
end;
implementation
{ TMyFtp }
procedure TMyFtp.DoWork(AWorkMode: TWorkMode; const ACount: Integer);
begin
if FWorkInfos[AWorkMode].Level > 0 then begin
Inc(FWorkInfos[AWorkMode].Current, ACount);
if assigned(OnWork) then begin
OnWork(Self, AWorkMode, FWorkInfos[AWorkMode].Current);
end;
end;
end;