예제 #1
0
 private void lblClose_Click(object sender, EventArgs e)
 {
     try
     {
         SSH.disconnect();
     }
     catch { }
     Application.Exit();
 }
예제 #2
0
        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();
            }
        }