Autor Beitrag
bruder jonas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Mi 24.07.02 14:55 
programmiert?

danke schön.
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mi 24.07.02 14:57 
für FTP?

Man kann MaxValue auf die dateigröße einstellen und Progress auf die übertragenden Bytes.

_________________
Viele Grüße
Jakob
bruder jonas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Mi 24.07.02 15:04 
Titel: ok, kannst du das bitte etwas näher erklären?
ich setzte progressbar.max die dateigröße.

aber wie setze ich auf progress die übertragenen bytes?

danke
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Do 25.07.02 12:17 
Angenommen du verwendest NMFTP. Dann kannst du

NMFTP1.BytesSent;

und

NMFTP1.BytesRecvd;

verwenden.

Evtl noch in OnPacektRecvd oder OnPacketSent einbauen und schon kannst du eine schöne Statusbar basteln.
bruder jonas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Do 25.07.02 14:12 
Titel: sorry, ich bin echt zu blöd das hinzubekommen.
kannst du bitte das beispiel etwas detaillierter nennen?
ich weiss nicht wie ich anfangen soll.

ich habe eine fileListBox, da will ich die dateien auswählen, die hochgeladen werden sollen.
und zu deren gesamtgröße brauch ich für den upload eine progressbar.

doch wie?

danke dir vielmals,

bJ
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Do 25.07.02 23:47 
Hi bruder Jonas,

also ich würde dann die Größen der einzelnen Dateien addieren und diese auf MaxValue setzen.
Dann nimmst du BytesSent und hast somit die Größe der gerade gesendeten Datei. Nach jedem vollständigen Datei-Upload setzt du dann nur Progress der Dateigröße(Summe) der bereits übertragenen Dateien plus BytesSent.

Es gibt bestimmt noch eine elegantere Lösung, aber mir fällt jetzt nix ein. :wink:

Gruß,
Ex0rzist
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Fr 26.07.02 10:35 
Zitat:
Es gibt bestimmt noch eine elegantere Lösung, aber mir fällt jetzt nix ein.


Ich denke, dass es nicht viele anderen Möglichkeiten gibt. Im Prinzip ist das auch die einzige Möglichkeit, die mir einfällt. Ich meine, wie sollte man das auch anders machen?

_________________
Viele Grüße
Jakob
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Fr 26.07.02 12:51 
Na gut. Dann war es halt die beste Lösung. :)

Gruß,
Ex0rzist
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Fr 26.07.02 13:02 
Zitat:
Na gut. Dann war es halt die beste Lösung. :)

Wer weiss, wer weiss :mrgreen:

_________________
Viele Grüße
Jakob
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Fr 26.07.02 13:21 
Naja, bis jetzt war es immer so, dass ich dachte, dass ich die Lösung hätte. Und dann kam doch immer noch jemand mit einem besseren Vorschlag.

Aber ich lasse mich nicht unterkriegen. :lol:

Gruß,
Ex0rzist
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Fr 26.07.02 13:23 
Zitat:
Aber ich lasse mich nicht unterkriegen.

Weiter so! Das ist die richtige Einstellung. Nur so wird man ein richtiger "Spitzen"-Programmierer. :mrgreen:

_________________
Viele Grüße
Jakob