![]() |
IdFTP AWorkCountMax = 0
Hi
Ich versuch mich gerade an einem kleinen ftp programm :stupid: Download usw funktioniert schon, nur ich habe hier das problem das AWorkCountMax immer 0 ist.. mache ich irgendetwas beim verbinden falsch ? oder brauch ich ein list um die dateigröße zu erfahren ?
Delphi-Quellcode:
noch ne kleine frage:
procedure TForm1.IdFTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer); begin ProgressBar1.Max := AWorkCountMax; ProgressBar1.Position := 0; Label12.Caption := IntToStr(AWorkCountMax div 1024); Application.ProcessMessages; end; Wie kann ich ambesten während eines transfers den transfer sauber abbrechen ? |
Re: IdFTP AWorkCountMax = 0
Hallo,
mit ....
Code:
umgehe ich dieses Problem mit dem AWorkCountMax = 0.
procedure TForm9.IdFTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer); begin if AWorkCountMax > 0 then ProgressBar1.Max := AWorkCountMax else ProgressBar1.Max := BytesToTransfer; end; mit....
Code:
breche ich einen Transfervorgang ab, wenn ich den Boolean-Wert Abbruch auf true setze.
procedure TForm9.IdFTP1Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer);
begin ProgressBar1.Position := AWorkCount; if Abbruch then IdFTP1.Abort; end; Gruß Pierre |
Re: IdFTP AWorkCountMax = 0
@Pierre:
Wo holst du dir denn BytesToTransfer her, wenn AWorkCountMax = 0 ist? |
Re: IdFTP AWorkCountMax = 0
Richtig, hatte ich übersehen:
Code:
und im Downloadbereich:
var
BytesToTransfer: LongWord;
Code:
mit DATEINAME als Donwloadfile
BytesToTransfer := IdFTP1.Size(DATEINAME);
Gruß Pierre |
Re: IdFTP AWorkCountMax = 0
Aaaaachso; gut so mach ich es auch. Ich dachte schon es gäb durch ne neue Version irgendeine zusätzliche Eigenschaft oder so...
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz