Exemplo n.º 1
0
        private void ShowProgress(string localFullPath, string fileName, SFTPFileTransferStatus status, ulong fileSize, ulong transmitted)
        {
            switch (status)
            {
            case SFTPFileTransferStatus.Open:
                Log(" | File: " + localFullPath);
                Log(" | ... Open");
                UpdateProgressBar(fileName, fileSize, transmitted, false);
                break;

            case SFTPFileTransferStatus.Transmitting:
                LogOverwrite(" | ... Transmitting");
                UpdateProgressBar(fileName, fileSize, transmitted, false);
                break;

            case SFTPFileTransferStatus.Close:
                LogOverwrite(" | ... Closing");
                UpdateProgressBar(fileName, fileSize, transmitted, false);
                break;

            case SFTPFileTransferStatus.CompletedSuccess:
                LogOverwrite(" | ... Done");
                UpdateProgressBar(fileName, fileSize, transmitted, true);
                break;

            case SFTPFileTransferStatus.CompletedError:
                LogOverwrite(" | ... Error");
                UpdateProgressBar(fileName, fileSize, transmitted, true);
                break;

            case SFTPFileTransferStatus.CompletedAbort:
                LogOverwrite(" | ... Aborted");
                UpdateProgressBar(fileName, fileSize, transmitted, true);
                break;
            }
        }
Exemplo n.º 2
0
 private void ShowProgress(string localFullPath, string fileName, SFTPFileTransferStatus status, ulong fileSize, ulong transmitted)
 {
     switch (status) {
         case SFTPFileTransferStatus.Open:
             Log(" | File: " + localFullPath);
             Log(" | ... Open");
             UpdateProgressBar(fileName, fileSize, transmitted, false);
             break;
         case SFTPFileTransferStatus.Transmitting:
             LogOverwrite(" | ... Transmitting");
             UpdateProgressBar(fileName, fileSize, transmitted, false);
             break;
         case SFTPFileTransferStatus.Close:
             LogOverwrite(" | ... Closing");
             UpdateProgressBar(fileName, fileSize, transmitted, false);
             break;
         case SFTPFileTransferStatus.CompletedSuccess:
             LogOverwrite(" | ... Done");
             UpdateProgressBar(fileName, fileSize, transmitted, true);
             break;
         case SFTPFileTransferStatus.CompletedError:
             LogOverwrite(" | ... Error");
             UpdateProgressBar(fileName, fileSize, transmitted, true);
             break;
         case SFTPFileTransferStatus.CompletedAbort:
             LogOverwrite(" | ... Aborted");
             UpdateProgressBar(fileName, fileSize, transmitted, true);
             break;
     }
 }