using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SSH_Test
{
    public partial class FormCredential : Form
    {
        public string Username { get; set; }
        public string Password { get; set; }
        public FormCredential(string username, string password)
        {
            
            InitializeComponent();
            textBoxUserName.Text = Username=username;
            textBoxUserName.Update();
            textBoxPassword.Text = Password=password;
            textBoxPassword.Update();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void textBoxUserName_TextChanged(object sender, EventArgs e)
        {
            textBoxUserName.Focus();
            Username = textBoxUserName.Text; 

        }

        private void textBoxPassword_TextChanged(object sender, EventArgs e)
        {
            textBoxPassword.Focus();
            Password = textBoxPassword.Text;
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            Username = "";
            Password = "";
            this.Close();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
