Exemplo n.º 1
0
        private void _ftp_TransferProgress(object sender, FtpTransferProgressEventArgs e)
        {
            Application.DoEvents();
            TotalBytesTransferred = TotalBytesFromCompletedTransfers + e.BytesTransfered;

            double currentFileBytesDownloadedSoFar = (double)e.BytesTransfered;
            double currentFileSizeInBytes = Convert.ToDouble(_currentRecording.SizeOnDisk);
            int iMaximum;
            int iCurrent;

            //Information for Total Progress Bar
            ConvertBytesToProgressBarInfo(DI.SizeOfAllFilesInBytes, TotalBytesTransferred, out iMaximum, out iCurrent);

            pBar.Maximum = iMaximum;
            pBar.Value = iCurrent;

            //Information for Current Progress Bar
            ConvertBytesToProgressBarInfo(_currentRecording.SizeOnDisk, currentFileBytesDownloadedSoFar, out iMaximum, out iCurrent);

            pbCBar.Maximum = iMaximum;
            pbCBar.Value = iCurrent;

            lblDR.Text = "Transfer Progress (" + _downloadedFileCount.ToString() + " of " + DI.LV.Items.Count.ToString() +
                ")\n" + _currentRecording.DisplayName + "\n(" + ConvertByteToString(currentFileBytesDownloadedSoFar) +
                " of " + ConvertByteToString(currentFileSizeInBytes) + ")";

            lblDR.Update();

            Application.DoEvents();
        }
Exemplo n.º 2
0
 private void _ftp_TransferProgress(object sender, FtpTransferProgressEventArgs e)
 {
     OnFireUploadProgressEvent(_uploadingFile.Name, _uploadingFile.Length, e.BytesTransfered);
 }