DjTurkisH Posted November 30, 2014 Share Posted November 30, 2014 Dosya indirilirken Hız Kalan Zaman gibi şeyleri nasıl Yapabiliriz ?? Quote Link to comment Share on other sites More sharing options...
kaan_karabey Posted November 30, 2014 Share Posted November 30, 2014 (edited) Dosya indirilirken Hız Kalan Zaman gibi şeyleri nasıl Yapabiliriz ?? Status.Dlg İle Gösterebilirsin Şu Şekilde; Şu Konuları Bir İncele: http://www.tnctr.com/topic/258763-soruftp-program-yndirici/ http://www.tnctr.com/topic/260204-ftp-download/ FTP.Connect("pack.ttnetbilisim.net", "anonymous", "", "", true) -- ziyaretçi olarak bağlan FTP.ChangeDir("ttnet/oktaymt2/") -- dosyanın bulunduğu klasöre git StatusDlg.Show(); -- progressi göster StatusDlg.ShowCancelButton(true, "İptal"); FTP.Download("packy.rar", "C:\\Downloads\\packy.rar", nil) -- dosyayı indir StatusDlg.Hide(); -- progressi gizle FTP.Disconnect(); -- bağlantıyı kapat Dialog.Message("Bilgi", "Dosyanın İndirilme İşlemi Tamamlandı", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); -- bilgi ver File.ExploreFolder("C:\\Downloads", SW_SHOWNORMAL); -- indirdiği klasörü aç Edited November 30, 2014 by kaan_karabey Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted November 30, 2014 Editor Share Posted November 30, 2014 ftp den dosya indirmek için öncelikle. FTP pluginini seçmelisiniz. Daha sonra. FTP de indirmek içni örnek kod bu zaten ActionWizard danda yaparsınız. FTPWI.Download("ftp://ftp.myftpsite.com/myfile.txt", "C:\\Downloads\\myfile.txt", "anonymous", "guest@", MODE_BINARY, 20, 21, true, ftpStatus); Son parametresine dikkat. ftpStatus yazmışım bu bir callback function dır arkaplanda işlem yapar. O fonksiyona istediğiniz değerleri yollar. Fonksiyonuda globalde bu şekilde tanımlarsanız. İstediğiniz değerler parametre olarka eklenmiştir. function ftpStatus(BytesRead,FileSize,TransferRate,SecondsLeft,SecondsLeftFormat,Message) end Gelen değerler ile alakalı bilgiler için burayı okuyun. The callback function must be able to receive the following parameters: BytesRead (number) The number of bytes that have been downloaded so far. FileSize (number) The file size in bytes or 0 if the file size could not be retrieved from the server. TransferRate (number) The current transfer rate in Kilobytes per second. SecondsLeft (number) The estimated number of seconds left in the download. SecondsLeftFormat (string) The estimated number of seconds left formatted as a string in the form of: ""MM:SS". Message (string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server." Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.