private void lblClose_Click(object sender, EventArgs e) { try { SSH.disconnect(); } catch { } Application.Exit(); }
private void btnSshLogin_Click(object sender, EventArgs e) { SshForm SshForm = new SshForm(); host = txtBoxHost.Text; username = txtBoxServeraddress.Text; password = txtBoxPassword.Text; port = Convert.ToInt32(txtBoxPort.Text); try { SSH.connect(host, username, password, port); } catch (Exception ex) { MessageBox.Show("Er is iets fouts gegaan: " + ex); } if (SSH.client.IsConnected) { this.Hide(); SshForm.Show(); } }