/// <summary> /// Instantiate the treeview containing the sessions /// </summary> /// <param name="dockPanel">The DockPanel container</param> /// <remarks>Having the dockpanel container is necessary to allow us to /// dock any terminal or file transfer sessions from within the treeview class</remarks> public SessionTreeview(frmPuttyWrap PuttyWrap, DockPanel dockPanel) { m_DockPanel = dockPanel; m_PuttyWrap = PuttyWrap; InitializeComponent(); // disable file transfers if pscp isn't configured. fileBrowserToolStripMenuItem.Enabled = frmPuttyWrap.IsScpEnabled; // populat sessions in the treeview from the registry LoadSessions(); }
public ctlPuttyPanel(frmPuttyWrap PuttyWrap, SessionData session, PuttyClosedCallback callback) { m_PuttyWrap = PuttyWrap; m_Session = session; m_ApplicationExit = callback; string args = "-" + session.Proto.ToString().ToLower() + " "; args += (!String.IsNullOrEmpty(m_Session.Password) && m_Session.Password.Length > 0) ? "-pw " + m_Session.Password + " " : ""; args += "-P " + m_Session.Port + " "; args += (!String.IsNullOrEmpty(m_Session.PuttySession)) ? "-load \"" + m_Session.PuttySession + "\" " : ""; args += (!String.IsNullOrEmpty(m_Session.Username) && m_Session.Username.Length > 0) ? m_Session.Username + "@" : ""; args += m_Session.Host; Logger.Log("Args: '{0}'", args); this.ApplicationParameters = args; InitializeComponent(); //this.Text = session.SessionName; this.TabText = session.SessionName; CreatePanel(); }