예제 #1
0
 public void ShowSessionTreeview()
 {
     m_Sessions = new SessionTreeview(this, dockPanel1);
     m_Sessions.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);
     this.toolbarViewSessions.Checked = true;
     Classes.Database.SetKeyStatic("ShowSessionTreeview", "true");
 }
예제 #2
0
        public frmSuperPutty(string[] args)
        {
            // Check SQLite Database
            openOrCreateSQLiteDatabase();

            #region Exe Paths
            // Get putty executable path
            if (File.Exists(this.m_db.GetKey("putty_exe")))
            {
                PuttyExe = this.m_db.GetKey("putty_exe");
            }

            // Get pscp executable path
            if (File.Exists(this.m_db.GetKey("pscp_exe")))
            {
                PscpExe = this.m_db.GetKey("pscp_exe");
            }

            if (String.IsNullOrEmpty(PuttyExe))
            {
                dlgFindPutty dialog = new dlgFindPutty();
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    this.m_db.SetKey("putty_exe", dialog.PuttyLocation);
                    this.m_db.SetKey("pscp_exe", dialog.PscpLocation);
                    PuttyExe = this.m_db.GetKey("putty_exe");
                    PscpExe = this.m_db.GetKey("pscp_exe");
                }
            }

            if (String.IsNullOrEmpty(PuttyExe))
            {
                MessageBox.Show("Cannot find PuTTY installation. Please visit http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html to download a copy",
                    "PuTTY Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                System.Environment.Exit(1);
            }
            #endregion

            InitializeComponent();

            #if DEBUG
            // Only show the option for the debug log viewer when we're compiled with DEBUG defined.
            debugLogToolStripMenuItem.Visible = true;
            #endif

            //Activate PasswordChar for passwordfield in connectbar
            PasswordTextBox.TextBox.UseSystemPasswordChar = true;

            //Select protocol SSH
            ProtocolBox.SelectedItem = ProtocolBox.Items[0];

            dockPanel1.ActiveDocumentChanged += dockPanel1_ActiveDocumentChanged;

            /*
             * Open the session treeview and dock it on the right
             */
            m_Sessions = new SessionTreeview(dockPanel1);
            m_Sessions.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);

            /*
             * Parsing CL Arguments
             */
            ParseClArguments(args);

            // Check for updates.
            checkForUpdate(true);
        }
예제 #3
0
 private void showSessionTreeview()
 {
     m_Sessions = new SessionTreeview(this, dockPanel1);
     m_Sessions.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);
 }
예제 #4
0
 public void ShowSessionTreeview()
 {
     m_Sessions = new SessionTreeview(this, dockPanel1);
     m_Sessions.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);
     this.toolbarViewSessions.Checked = true;
     Classes.Database.SetKeyStatic("ShowSessionTreeview", "true");
 }
예제 #5
0
        public frmSuperPutty(string[] args)
        {
            // Check SQLite Database
            openOrCreateSQLiteDatabase();

            #region Exe Paths
            // Get putty executable path
            if (File.Exists(this.m_db.GetKey("putty_exe")))
            {
                PuttyExe = this.m_db.GetKey("putty_exe");
            }

            // Get pscp executable path
            if (File.Exists(this.m_db.GetKey("pscp_exe")))
            {
                PscpExe = this.m_db.GetKey("pscp_exe");
            }

            if (String.IsNullOrEmpty(PuttyExe))
            {
                dlgFindPutty dialog = new dlgFindPutty();
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    this.m_db.SetKey("putty_exe", dialog.PuttyLocation);
                    this.m_db.SetKey("pscp_exe", dialog.PscpLocation);
                    PuttyExe = this.m_db.GetKey("putty_exe");
                    PscpExe  = this.m_db.GetKey("pscp_exe");
                }
            }

            if (String.IsNullOrEmpty(PuttyExe))
            {
                MessageBox.Show("Cannot find PuTTY installation. Please visit http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html to download a copy",
                                "PuTTY Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                System.Environment.Exit(1);
            }
            #endregion

            InitializeComponent();

#if DEBUG
            // Only show the option for the debug log viewer when we're compiled with DEBUG defined.
            debugLogToolStripMenuItem.Visible = true;
#endif

            //Activate PasswordChar for passwordfield in connectbar
            PasswordTextBox.TextBox.UseSystemPasswordChar = true;

            //Select protocol SSH
            ProtocolBox.SelectedItem = ProtocolBox.Items[0];

            dockPanel1.ActiveDocumentChanged += dockPanel1_ActiveDocumentChanged;

            /*
             * Open the session treeview and dock it on the right
             */
            m_Sessions = new SessionTreeview(dockPanel1);
            m_Sessions.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);

            /*
             * Parsing CL Arguments
             */
            ParseClArguments(args);

            // Check for updates.
            checkForUpdate(true);
        }
예제 #6
0
        public frmSuperPutty()
        {
            // Get Registry Entry for Putty Exe
            RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Jim Radford\SuperPuTTY\Settings");
            if (key != null)
            {
                string puttyExe = key.GetValue("PuTTYExe", "").ToString();
                if (File.Exists(puttyExe))
                {
                    PuttyExe = puttyExe;
                }

                string pscpExe = key.GetValue("PscpExe", "").ToString();
                if (File.Exists(pscpExe))
                {
                    PscpExe = pscpExe;
                }
            }

            if (String.IsNullOrEmpty(PuttyExe))
            {
                dlgFindPutty dialog = new dlgFindPutty();
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    PuttyExe = dialog.PuttyLocation;
                    PscpExe = dialog.PscpLocation;
                }
            }

            if (String.IsNullOrEmpty(PuttyExe))
            {
                MessageBox.Show("Cannot find PuTTY installation. Please visit http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html to download a copy",
                    "PuTTY Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                System.Environment.Exit(1);
            }

            InitializeComponent();

            #if DEBUG
            // Only show the option for the debug log viewer when we're compiled with DEBUG defined.
            debugLogToolStripMenuItem.Visible = true;
            #endif

            dockPanel1.ActiveDocumentChanged += dockPanel1_ActiveDocumentChanged;

            /*
             * Open the session treeview and dock it on the right
             */
            m_Sessions = new SessionTreeview(dockPanel1);
            m_Sessions.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);
        }
예제 #7
0
 private void showSessionTreeview()
 {
     m_Sessions = new SessionTreeview(this, dockPanel1);
     m_Sessions.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);
 }