private void puTTYScpLocationToolStripMenuItem_Click(object sender, EventArgs e) { dlgFindPutty dialog = new dlgFindPutty(); if (dialog.ShowDialog() == DialogResult.OK) { PuttyExe = dialog.PuttyLocation; PscpExe = dialog.PscpLocation; } }
public frmPuttyWrap(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(this, dockPanel1); if(Classes.Database.GetBooleanKey("ShowSessionTreeview", true)) { showSessionTreeview(); } /* * Parsing CL Arguments */ ParseClArguments(args); // First time automatic update check //firstTimeAutomaticUpdateCheck(); // Set automatic update check menu item setAutomaticUpdateCheckMenuItem(); // Set addtional timing menu item setAdditionalTimingMenuItem(); // Check for updates. checkForUpdate(true); // Set window state and size setWindowStateAndSize(); }
public frmPuttyWrap(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(this, dockPanel1); if (Classes.Database.GetBooleanKey("ShowSessionTreeview", true)) { showSessionTreeview(); } /* * Parsing CL Arguments */ ParseClArguments(args); // First time automatic update check //firstTimeAutomaticUpdateCheck(); // Set automatic update check menu item setAutomaticUpdateCheckMenuItem(); // Set addtional timing menu item setAdditionalTimingMenuItem(); // Check for updates. checkForUpdate(true); // Set window state and size setWindowStateAndSize(); }