تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشروع تحميل ملفات من الانترنت
#1
رأيت برنامج شبيه هنا ولكن الاختلاف لا يضر يفيد في الاطلاع




لمحة عن الكود

PHP كود :
Private WithEvents downloader As New FileDownloader 


PHP كود :
' A simple implementation of setting the directory path, 
adding files from a textbox and starting the download
Private Sub btnStart_Click(ByVal sender As System.Object_
    ByVal e 
As System.EventArgsHandles btnStart.Click
    Dim openFolderDialog 
As New FolderBrowserDialog
    With downloader
        If openFolderDialog
.ShowDialog() = Windows.Forms.DialogResult.OK Then
            
.Files.Clear()
 
           .LocalDirectory openFolderDialog.SelectedPath
            For Each path 
As String In txtFilesToDownload.Lines
           
' The FileInfo structure will parse your path, 
      ' 
and split it to the path itself and the file name
     
 ' which will both be available for you
                .Files.Add(New FileDownloader.FileInfo(path))
            Next
            .Start()
        End If
    End With
End Sub 


PHP كود :
Private Sub btnPauze_Click(ByVal sender As System.Object_
        ByVal e 
As System.EventArgsHandles btnPauze.Click
    
' Pause the downloader
    downloader.Pause()
End Sub 

PHP كود :
Private Sub btnResume_Click(ByVal sender As System.Object_
        ByVal e 
As System.EventArgsHandles btnResume.Click
    
' Resume the downloader
    downloader.Resume()
End Sub 

PHP كود :
Private Sub btnStop_Click(ByVal sender As System.Object_
        ByVal e 
As System.EventArgsHandles btnStop.Click
    
' Stop the downloader
    ' 
NoteThis will not be instantaneous the current requests need to 
    
' be closed down, and the downloaded files need to be deleted
    downloader.Stop()
End Sub 


PHP كود :
' This event is fired every time the paused or busy state is changed, 
and used here to set the controls of the interface
Private 
Sub downloader_StateChanged() _
    Handles downloader
.StateChanged 'This is equal to: Handles 
                       '
downloader.IsBusyChangeddownloader.IsPausedChanged
    
' Setting the buttons
    btnStart.Enabled = downloader.CanStart
    btnStop.Enabled = downloader.CanStop
    btnPauze.Enabled = downloader.CanPause
    btnResume.Enabled = downloader.CanResume

    ' 
Enabling or disabling the setting controls
    txtFilesToDownload
.ReadOnly downloader.IsBusy
    cbUseProgress
.Enabled Not downloader.IsBusy
End Sub 

PHP كود :
' Occurs every time a block of data has been downloaded, 
and can be used to display the progress with
' Note that you can also create a timer, and display the progress 
every certain interval
' Also note that the progress properties return a size in bytes, 
which is not really user friendly to display
' The FileDownloader class provides shared functions to format these 
byte amounts to a more readable formateither in binary or decimal notation
Private Sub downloader_ProgressChanged() Handles downloader.ProgressChanged
    pBarFileProgress
.Value CInt(downloader.CurrentFilePercentage)
 
   lblFileProgressDetails.Text String.Format("Downloaded {0} of {1} ({2}%)"_
        FileDownloader
.FormatSizeBinary(downloader.CurrentFileProgress), _
        FileDownloader
.FormatSizeBinary(downloader.CurrentFileSize), _
        downloader
.CurrentFilePercentage) & String.Format(" - {0}/s"_
        FileDownloader
.FormatSizeBinary(downloader.DownloadSpeed))
 
   If downloader.SupportsProgress Then
        pBarTotalProgress
.Value CInt(downloader.TotalPercentage)
 
       lblTotalProgressDetails.Text _
        String
.Format("Downloaded {0} of {1} ({2}%)"_
        FileDownloader
.FormatSizeBinary(downloader.TotalProgress), _
        FileDownloader
.FormatSizeBinary(downloader.TotalSize), _
        downloader
.TotalPercentage)
 
   End If
End Sub 


الملفات المرفقة
.zip   FileDownloaderSource.zip (الحجم : 30.21 ك ب / التحميلات : 265)
الرد }}}
تم الشكر بواسطة: sendbad100 , asemshahen5 , خلاف , خلاف


الردود في هذا الموضوع
مشروع تحميل ملفات من الانترنت - بواسطة viv - 12-05-18, 03:04 AM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  مثال تحميل من اليوتيوب justforit 0 223 22-10-25, 01:38 AM
آخر رد: justforit
  [مشروع] مشروع إدارة الأقساط قابل للتعديل musalem 7 2,118 07-02-25, 08:09 PM
آخر رد: الورد2
  [VB.NET] مشروع لارسال اشعارات مثل push notifications للهواتف ميدو الفنان 1 840 30-01-25, 12:42 AM
آخر رد: Mina Botros
  [مشروع] مشروع ادارة المراكز الطبية رضوان الجماعي 9 4,721 05-11-24, 03:48 PM
آخر رد: hum100
  رابط تحميل برنامج منبه الصلاة | Prayer Alarm mmaalmesry 0 554 04-11-24, 06:02 PM
آخر رد: mmaalmesry
  [مشروع] تصميم احترافي لبرنامج شئون الموظفين باستخدام ديف اكسبريس + تحميل السورس كود mazentq 7 7,727 14-10-24, 05:21 PM
آخر رد: بوحمد
Wink [مشروع] مشروع انشاء برنامج يقوم بالتقاط اللون من اسفل المؤشر وتحويلة للهكس كود وار جي بي ahmadpal 2 1,755 01-10-24, 05:33 PM
آخر رد: مصمم هاوي
  مشروع ضغط و صيانة قاعدة بيانات vb.net sql server غزة العزة 1 727 03-06-24, 05:12 PM
آخر رد: salamandal
  مشروع تكبير حجم الخط عند جعل الفورم max في سي شارب العتيق 0 426 02-06-24, 10:24 PM
آخر رد: العتيق
  [سلسلة تعليمية] مشروع برنامج بحث وحذف وتحديث البيانات في فايربيس vb . net الجزء الثاني ahmadpal 1 2,273 10-04-24, 04:36 AM
آخر رد: emadahmed1995

التنقل السريع :


يقوم بقرائة الموضوع: