SFTP Client

This class is designed to be used in the worker thread.

Some methods block thread while waiting for the response.

Referenced specification:
IETF Network Working Group Internet Draft
SSH File Transfer Protocol
draft-ietf-secsh-filexfer-02 (protocol version 3)
Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public SFTPForm(Form ownerForm, SFTPClient sftp, string connectionName)
        {
            InitializeComponent();

            if (!this.DesignMode) {
                this._sftp = sftp;
                this._ownerForm = ownerForm;
                this._remoteName = connectionName;
                this.Text = "SFTP - " + connectionName;
                this.progressBar.Maximum = PROGRESSBAR_MAX;

                PrepareTreeIcons();
                SetIcon();
                SetText();

                ClearProgressBar();

                // Note: Setting TreeViewNodeSorter property enables sorting.
                treeViewRemote.TreeViewNodeSorter = new NodeSorter();
            }
        }
Пример #2
0
 private void SFTPForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_ownerForm != null) {
         _ownerForm.FormClosed -= new FormClosedEventHandler(_ownerForm_FormClosed);
         _ownerForm = null;
         _sftp = null;
     }
 }