Example #1
0
        /// <summary>
        /// Open a directory listing on the selected nodes host to allow dropping files
        /// for drag + drop copy.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void fileBrowserToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SessionData session = (SessionData)treeView1.SelectedNode.Tag;
            RemoteFileListPanel dir = null;
            bool cancelShow = false;
            if (session != null)
            {
                PuttyClosedCallback callback = delegate(bool error)
                {
                    cancelShow = error;
                };
                PscpTransfer xfer = new PscpTransfer(session);
                xfer.PuttyClosed = callback;

                dir = new RemoteFileListPanel(xfer, m_DockPanel, session);
                if (!cancelShow)
                {
                    dir.Show(m_DockPanel);
                }
            }
        }
Example #2
0
        public void CreateRemoteFileListPanel(SessionData sessionData)
        {
            RemoteFileListPanel dir = null;
            bool cancelShow = false;
            if (sessionData != null)
            {
                PuttyClosedCallback callback = delegate(bool error)
                {
                    cancelShow = error;
                };
                PscpTransfer xfer = new PscpTransfer(sessionData);
                xfer.PuttyClosed = callback;

                dir = new RemoteFileListPanel(xfer, dockPanel1, sessionData);
                if (!cancelShow)
                {
                    dir.Show(dockPanel1);
                }
            }
        }
Example #3
0
        static void OpenScpSessionOld(SessionData session)
        {
            Log.InfoFormat("Opening scp session, id={0}", session == null ? "" : session.SessionId);
            if (!IsScpEnabled)
            {
                SuperPuTTY.ReportStatus("Could not open session, pscp not found: {0} [SCP]", session.SessionId);
            }
            else if (session != null)
            {
                RemoteFileListPanel panel = null;
                bool cancelShow = false;
                if (session != null)
                {
                    PuttyClosedCallback callback = delegate(bool error)
                    {
                        cancelShow = error;
                    };
                    PscpTransfer xfer = new PscpTransfer(session);
                    xfer.PuttyClosed = callback;

                    panel = new RemoteFileListPanel(xfer, SuperPuTTY.MainForm.DockPanel, session);
                    ApplyDockRestrictions(panel);
                    ApplyIconForWindow(panel, session);
                    if (!cancelShow)
                    {
                        panel.Show(MainForm.DockPanel, session.LastDockstate);
                    }
                }

                SuperPuTTY.ReportStatus("Opened session: {0} [SCP]", session.SessionId);
            }
            else
            {
                Log.Warn("Could not open null session");
            }
        }