dont download file with progresbar

Advertisement

AndrewVas
Joined:
Posts:
1
Location:
Russian

dont download file with progresbar

I used this WinSCP library in WPF to download files from the FTP server. Everything worked until I decided to add an installation with a progress bar:
void SessionFileTransferProgress(Object sender , FileTransferProgressEventArgs e)
{
    MessageBox.Show(e.FileName);
}
It was giving an install error!

Without this, everything works, but I still need to add the progres bar update.

The size of the files folder is very huge!

My code:
using (Session session = new Session())
{
    // Will continuously report progress of transfer
   // session.FileTransferProgress += SessionFileTransferProgress;
 
    // Connect
    session.Open(sessionOptions);
 
    try
    {
        // Download files and throw on any error
        session.GetFiles(url, path);
    }
    finally
    {
        // Terminate line after the last file (if any)
        MessageBox.Show("Download stop");
    }
}
Version WinSCP: 5.19.3

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: dont download file with progresbar

What "install error"? What exact error are you getting? Post full exception stacktrace.

Reply with quote

Advertisement

You can post new topics in this forum