Example #1
0
        public static void OpenScpSession(SessionData session)
        {
            Log.InfoFormat("Opening scp session, id={0}", session == null ? "" : session.SessionName);
            if (!IsScpEnabled)
            {
                SuperPuTTY.ReportStatus("Could not open session, pscp not found: {0} [SCP]", session.SessionName);
            }
            else if (session != null)
            {
                PscpBrowserPanel panel = new PscpBrowserPanel(
                    session, new PscpOptions { PscpLocation = Settings.PscpExe },
                    Environment.GetFolderPath(Environment.SpecialFolder.Desktop));
                ApplyDockRestrictions(panel);
                ApplyIconForWindow(panel, session);
                panel.Show(MainForm.DockPanel, session.LastDockstate);

                session.IsActive = true;
                SuperPuTTY.ReportStatus("Opened session: {0} [SCP]", session.SessionName);

                SuperPuTTY.RefreshSessions();
            }
            else
            {
                Log.Warn("Could not open null session");
            }
        }
        public void RunPscpBrowserPanel()
        {
            SessionData session = new SessionData
            {
                //SessionId = "Test/SessionId",
                SessionName = "Test SessionName",
                Username = ScpConfig.UserName,
                Password = ScpConfig.Password,
                Host = ScpConfig.KnownHost,
                Port = 22
            };

            PscpBrowserPanel panel = new PscpBrowserPanel(session, ScpConfig.DefaultOptions);
            panel.Size = new Size(1024, 768);
            panel.Show();
        }