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 FormConfiguration : Form
    {
        public string Tftp_IP { get; set; }
        public string Sftp_IP { get; set; }
        public string Sftp_Username { get; set; }
        public string Sftp_Password { get; set; }
        public string IDRAC_IP { get; set; }
        public string IDRAC_Username { get; set; }
        public string IDRAC_Password { get; set; }
        public bool IDRAC_Local { get; set; }


        public FormConfiguration(string tftp_IP, string sftpIP, string sftp_Username, string sftp_Password, string idrac_IP, string idrac_Username, string idrac_Password, bool iDRAC_Local)
        {
            InitializeComponent();
            this.textBoxTftpIP.Text = Tftp_IP = tftp_IP;
            this.textBoxSftpIP.Text = Sftp_IP = sftpIP;
            this.textBoxSftpUsername.Text = Sftp_Username = sftp_Username;
            this.textBoxSftpPassword.Text = Sftp_Password = sftp_Password;
            this.textBoxIDRACIP.Text = IDRAC_IP = idrac_IP;
            this.textBoxIDRACUsername.Text = IDRAC_Username = idrac_Username;
            this.textBoxIDRACPassword.Text = IDRAC_Password = idrac_Password;
            this.checkBox_Local.Checked = iDRAC_Local;
            this.Update();
            
        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            Tftp_IP = textBoxTftpIP.Text;
            Sftp_IP = textBoxSftpIP.Text;
            Sftp_Username = textBoxSftpUsername.Text;
            Sftp_Password = textBoxSftpPassword.Text;
            IDRAC_IP = textBoxIDRACIP.Text;
            IDRAC_Username= textBoxIDRACUsername.Text;
            IDRAC_Password= textBoxIDRACPassword.Text;
            IDRAC_Local=checkBox_Local.Checked;
            this.Close();
        }

        private void FormConfiguration_Load(object sender, EventArgs e)
        {

        }

        private void checkBox_Local_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox_Local.Checked)
            {
                checkBox_Local.Checked = true;
                IDRAC_Local = checkBox_Local.Checked;
            }
            else
            {
                checkBox_Local.Checked = false;
                IDRAC_Local = checkBox_Local.Checked;
            }

        }
    }
}
