From ecec60554fcd620616b334ee36daf7f69c05ee85 Mon Sep 17 00:00:00 2001 From: andnb Date: Fri, 16 Jan 2026 16:20:16 +0000 Subject: [PATCH] Option to run Racadm locally; handle: logs, exceptions. Separate folders for scripts, logs --- SSH_Test/App.config | 58 +-- SSH_Test/FormConfiguration.Designer.cs | 541 +++++++++++++------------ SSH_Test/FormConfiguration.cs | 163 ++++---- SSH_Test/FormConfiguration.resx | 238 +++++------ 4 files changed, 519 insertions(+), 481 deletions(-) diff --git a/SSH_Test/App.config b/SSH_Test/App.config index bbb4072..48099a2 100644 --- a/SSH_Test/App.config +++ b/SSH_Test/App.config @@ -1,30 +1,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SSH_Test/FormConfiguration.Designer.cs b/SSH_Test/FormConfiguration.Designer.cs index 37fd674..abcb680 100644 --- a/SSH_Test/FormConfiguration.Designer.cs +++ b/SSH_Test/FormConfiguration.Designer.cs @@ -1,264 +1,279 @@ -namespace SSH_Test -{ - partial class FormConfiguration - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.labelIP = new System.Windows.Forms.Label(); - this.textBoxSftpIP = new System.Windows.Forms.TextBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.label2 = new System.Windows.Forms.Label(); - this.textBoxSftpPassword = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.textBoxSftpUsername = new System.Windows.Forms.TextBox(); - this.buttonOK = new System.Windows.Forms.Button(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.label5 = new System.Windows.Forms.Label(); - this.textBoxTftpIP = new System.Windows.Forms.TextBox(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.label3 = new System.Windows.Forms.Label(); - this.textBoxIDRACPassword = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.textBoxIDRACUsername = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.textBoxIDRACIP = new System.Windows.Forms.TextBox(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.SuspendLayout(); - // - // labelIP - // - this.labelIP.AutoSize = true; - this.labelIP.Location = new System.Drawing.Point(20, 28); - this.labelIP.Name = "labelIP"; - this.labelIP.Size = new System.Drawing.Size(17, 13); - this.labelIP.TabIndex = 0; - this.labelIP.Text = "IP"; - this.labelIP.Click += new System.EventHandler(this.label1_Click); - // - // textBoxSftpIP - // - this.textBoxSftpIP.Location = new System.Drawing.Point(55, 25); - this.textBoxSftpIP.Name = "textBoxSftpIP"; - this.textBoxSftpIP.Size = new System.Drawing.Size(214, 20); - this.textBoxSftpIP.TabIndex = 1; - this.textBoxSftpIP.TextChanged += new System.EventHandler(this.textBox1_TextChanged); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Controls.Add(this.textBoxSftpPassword); - this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.textBoxSftpUsername); - this.groupBox1.Controls.Add(this.labelIP); - this.groupBox1.Controls.Add(this.textBoxSftpIP); - this.groupBox1.Location = new System.Drawing.Point(12, 71); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(278, 118); - this.groupBox1.TabIndex = 3; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Sftp"; - this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(20, 80); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(53, 13); - this.label2.TabIndex = 4; - this.label2.Text = "Password"; - this.label2.Click += new System.EventHandler(this.label2_Click); - // - // textBoxSftpPassword - // - this.textBoxSftpPassword.Location = new System.Drawing.Point(83, 77); - this.textBoxSftpPassword.Name = "textBoxSftpPassword"; - this.textBoxSftpPassword.Size = new System.Drawing.Size(186, 20); - this.textBoxSftpPassword.TabIndex = 5; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(20, 54); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(57, 13); - this.label1.TabIndex = 2; - this.label1.Text = "UserName"; - // - // textBoxSftpUsername - // - this.textBoxSftpUsername.Location = new System.Drawing.Point(83, 51); - this.textBoxSftpUsername.Name = "textBoxSftpUsername"; - this.textBoxSftpUsername.Size = new System.Drawing.Size(186, 20); - this.textBoxSftpUsername.TabIndex = 3; - // - // buttonOK - // - this.buttonOK.Location = new System.Drawing.Point(55, 195); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(151, 23); - this.buttonOK.TabIndex = 4; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.label5); - this.groupBox2.Controls.Add(this.textBoxTftpIP); - this.groupBox2.Location = new System.Drawing.Point(12, 12); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(278, 53); - this.groupBox2.TabIndex = 6; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Tftp"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(20, 28); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(17, 13); - this.label5.TabIndex = 0; - this.label5.Text = "IP"; - // - // textBoxTftpIP - // - this.textBoxTftpIP.Location = new System.Drawing.Point(55, 25); - this.textBoxTftpIP.Name = "textBoxTftpIP"; - this.textBoxTftpIP.Size = new System.Drawing.Size(214, 20); - this.textBoxTftpIP.TabIndex = 1; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.label3); - this.groupBox3.Controls.Add(this.textBoxIDRACPassword); - this.groupBox3.Controls.Add(this.label4); - this.groupBox3.Controls.Add(this.textBoxIDRACUsername); - this.groupBox3.Controls.Add(this.label6); - this.groupBox3.Controls.Add(this.textBoxIDRACIP); - this.groupBox3.Location = new System.Drawing.Point(307, 12); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(278, 118); - this.groupBox3.TabIndex = 6; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "IDRAC"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(20, 80); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(53, 13); - this.label3.TabIndex = 4; - this.label3.Text = "Password"; - // - // textBoxIDRACPassword - // - this.textBoxIDRACPassword.Location = new System.Drawing.Point(83, 77); - this.textBoxIDRACPassword.Name = "textBoxIDRACPassword"; - this.textBoxIDRACPassword.Size = new System.Drawing.Size(186, 20); - this.textBoxIDRACPassword.TabIndex = 5; - this.textBoxIDRACPassword.UseSystemPasswordChar = true; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(20, 54); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(57, 13); - this.label4.TabIndex = 2; - this.label4.Text = "UserName"; - // - // textBoxIDRACUsername - // - this.textBoxIDRACUsername.Location = new System.Drawing.Point(83, 51); - this.textBoxIDRACUsername.Name = "textBoxIDRACUsername"; - this.textBoxIDRACUsername.Size = new System.Drawing.Size(186, 20); - this.textBoxIDRACUsername.TabIndex = 3; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(20, 28); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(17, 13); - this.label6.TabIndex = 0; - this.label6.Text = "IP"; - // - // textBoxIDRACIP - // - this.textBoxIDRACIP.Location = new System.Drawing.Point(55, 25); - this.textBoxIDRACIP.Name = "textBoxIDRACIP"; - this.textBoxIDRACIP.Size = new System.Drawing.Size(214, 20); - this.textBoxIDRACIP.TabIndex = 1; - // - // FormConfiguration - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(586, 228); - this.Controls.Add(this.groupBox3); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.groupBox1); - this.Name = "FormConfiguration"; - this.Text = "FormConfiguration"; - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label labelIP; - private System.Windows.Forms.TextBox textBoxSftpIP; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox textBoxSftpPassword; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox textBoxSftpUsername; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox textBoxTftpIP; - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox textBoxIDRACPassword; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox textBoxIDRACUsername; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox textBoxIDRACIP; - } +namespace SSH_Test +{ + partial class FormConfiguration + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.labelIP = new System.Windows.Forms.Label(); + this.textBoxSftpIP = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.textBoxSftpPassword = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.textBoxSftpUsername = new System.Windows.Forms.TextBox(); + this.buttonOK = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label5 = new System.Windows.Forms.Label(); + this.textBoxTftpIP = new System.Windows.Forms.TextBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.checkBox_Local = new System.Windows.Forms.CheckBox(); + this.label3 = new System.Windows.Forms.Label(); + this.textBoxIDRACPassword = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.textBoxIDRACUsername = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.textBoxIDRACIP = new System.Windows.Forms.TextBox(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // labelIP + // + this.labelIP.AutoSize = true; + this.labelIP.Location = new System.Drawing.Point(20, 28); + this.labelIP.Name = "labelIP"; + this.labelIP.Size = new System.Drawing.Size(17, 13); + this.labelIP.TabIndex = 0; + this.labelIP.Text = "IP"; + this.labelIP.Click += new System.EventHandler(this.label1_Click); + // + // textBoxSftpIP + // + this.textBoxSftpIP.Location = new System.Drawing.Point(55, 25); + this.textBoxSftpIP.Name = "textBoxSftpIP"; + this.textBoxSftpIP.Size = new System.Drawing.Size(214, 20); + this.textBoxSftpIP.TabIndex = 1; + this.textBoxSftpIP.TextChanged += new System.EventHandler(this.textBox1_TextChanged); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.textBoxSftpPassword); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.textBoxSftpUsername); + this.groupBox1.Controls.Add(this.labelIP); + this.groupBox1.Controls.Add(this.textBoxSftpIP); + this.groupBox1.Location = new System.Drawing.Point(12, 71); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(278, 118); + this.groupBox1.TabIndex = 3; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Sftp"; + this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(20, 80); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(53, 13); + this.label2.TabIndex = 4; + this.label2.Text = "Password"; + this.label2.Click += new System.EventHandler(this.label2_Click); + // + // textBoxSftpPassword + // + this.textBoxSftpPassword.Location = new System.Drawing.Point(83, 77); + this.textBoxSftpPassword.Name = "textBoxSftpPassword"; + this.textBoxSftpPassword.Size = new System.Drawing.Size(186, 20); + this.textBoxSftpPassword.TabIndex = 5; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(20, 54); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(57, 13); + this.label1.TabIndex = 2; + this.label1.Text = "UserName"; + // + // textBoxSftpUsername + // + this.textBoxSftpUsername.Location = new System.Drawing.Point(83, 51); + this.textBoxSftpUsername.Name = "textBoxSftpUsername"; + this.textBoxSftpUsername.Size = new System.Drawing.Size(186, 20); + this.textBoxSftpUsername.TabIndex = 3; + // + // buttonOK + // + this.buttonOK.Location = new System.Drawing.Point(55, 195); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(151, 23); + this.buttonOK.TabIndex = 4; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.textBoxTftpIP); + this.groupBox2.Location = new System.Drawing.Point(12, 12); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(278, 53); + this.groupBox2.TabIndex = 6; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Tftp"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(20, 28); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(17, 13); + this.label5.TabIndex = 0; + this.label5.Text = "IP"; + // + // textBoxTftpIP + // + this.textBoxTftpIP.Location = new System.Drawing.Point(55, 25); + this.textBoxTftpIP.Name = "textBoxTftpIP"; + this.textBoxTftpIP.Size = new System.Drawing.Size(214, 20); + this.textBoxTftpIP.TabIndex = 1; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.checkBox_Local); + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Controls.Add(this.textBoxIDRACPassword); + this.groupBox3.Controls.Add(this.label4); + this.groupBox3.Controls.Add(this.textBoxIDRACUsername); + this.groupBox3.Controls.Add(this.label6); + this.groupBox3.Controls.Add(this.textBoxIDRACIP); + this.groupBox3.Location = new System.Drawing.Point(307, 12); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(278, 152); + this.groupBox3.TabIndex = 6; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "IDRAC"; + // + // checkBox_Local + // + this.checkBox_Local.AutoSize = true; + this.checkBox_Local.Location = new System.Drawing.Point(23, 19); + this.checkBox_Local.Name = "checkBox_Local"; + this.checkBox_Local.Size = new System.Drawing.Size(52, 17); + this.checkBox_Local.TabIndex = 6; + this.checkBox_Local.Text = "Local"; + this.checkBox_Local.UseVisualStyleBackColor = true; + this.checkBox_Local.CheckedChanged += new System.EventHandler(this.checkBox_Local_CheckedChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(20, 105); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 13); + this.label3.TabIndex = 4; + this.label3.Text = "Password"; + // + // textBoxIDRACPassword + // + this.textBoxIDRACPassword.Location = new System.Drawing.Point(83, 102); + this.textBoxIDRACPassword.Name = "textBoxIDRACPassword"; + this.textBoxIDRACPassword.Size = new System.Drawing.Size(186, 20); + this.textBoxIDRACPassword.TabIndex = 5; + this.textBoxIDRACPassword.UseSystemPasswordChar = true; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(20, 79); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(57, 13); + this.label4.TabIndex = 2; + this.label4.Text = "UserName"; + // + // textBoxIDRACUsername + // + this.textBoxIDRACUsername.Location = new System.Drawing.Point(83, 76); + this.textBoxIDRACUsername.Name = "textBoxIDRACUsername"; + this.textBoxIDRACUsername.Size = new System.Drawing.Size(186, 20); + this.textBoxIDRACUsername.TabIndex = 3; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(56, 53); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(17, 13); + this.label6.TabIndex = 0; + this.label6.Text = "IP"; + // + // textBoxIDRACIP + // + this.textBoxIDRACIP.Location = new System.Drawing.Point(83, 50); + this.textBoxIDRACIP.Name = "textBoxIDRACIP"; + this.textBoxIDRACIP.Size = new System.Drawing.Size(186, 20); + this.textBoxIDRACIP.TabIndex = 1; + // + // FormConfiguration + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(586, 228); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.groupBox1); + this.Name = "FormConfiguration"; + this.Text = "FormConfiguration"; + this.Load += new System.EventHandler(this.FormConfiguration_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelIP; + private System.Windows.Forms.TextBox textBoxSftpIP; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBoxSftpPassword; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBoxSftpUsername; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox textBoxTftpIP; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBoxIDRACPassword; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox textBoxIDRACUsername; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBoxIDRACIP; + private System.Windows.Forms.CheckBox checkBox_Local; + } } \ No newline at end of file diff --git a/SSH_Test/FormConfiguration.cs b/SSH_Test/FormConfiguration.cs index eda7230..98e7812 100644 --- a/SSH_Test/FormConfiguration.cs +++ b/SSH_Test/FormConfiguration.cs @@ -1,70 +1,93 @@ -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 FormConfiguration(string tftp_IP, string sftpIP, string sftp_Username, string sftp_Password, string idrac_IP, string idrac_Username, string idrac_Password) - { - 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.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; - this.Close(); - } - } -} +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; + } + + } + } +} diff --git a/SSH_Test/FormConfiguration.resx b/SSH_Test/FormConfiguration.resx index 1af7de1..29dcb1b 100644 --- a/SSH_Test/FormConfiguration.resx +++ b/SSH_Test/FormConfiguration.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file