Minor design changes in "Change Key" window

This commit is contained in:
Alexander 2018-12-12 16:42:41 +02:00
parent 7b5562c757
commit 45e237f797
2 changed files with 9 additions and 8 deletions

View file

@ -146,11 +146,11 @@ private void InitializeComponent()
// statusLabel
//
this.statusLabel.AutoSize = true;
this.statusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.statusLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(35)))));
this.statusLabel.Location = new System.Drawing.Point(5, 88);
this.statusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.statusLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.statusLabel.Location = new System.Drawing.Point(5, 87);
this.statusLabel.Name = "statusLabel";
this.statusLabel.Size = new System.Drawing.Size(35, 13);
this.statusLabel.Size = new System.Drawing.Size(43, 16);
this.statusLabel.TabIndex = 7;
this.statusLabel.Text = "status";
this.statusLabel.Visible = false;

View file

@ -20,18 +20,19 @@ private async void button1_Click(object sender, EventArgs e)
publicVar.keyChanged = true;
textBox1.Text = "";
textBox2.Text = "";
statusLabel.Text = "Key was successfully changed!";
statusLabel.Text = "Key was successfully changed";
statusLabel.Visible = true;
button1.Enabled = false;
await Task.Delay(2000);
this.Close();
statusLabel.Text = "";
//this.Close();
return;
}
if (textBox1.Text != publicVar.encryptionKey.Get())
{
SystemSounds.Beep.Play();
statusLabel.Text = "Invalid old key!";
statusLabel.Text = "Invalid old key";
statusLabel.Visible = true;
textBox1.Text = "";
textBox2.Text = "";
@ -41,7 +42,7 @@ private async void button1_Click(object sender, EventArgs e)
if (textBox1.Text == textBox2.Text)
{
SystemSounds.Beep.Play();
statusLabel.Text = "New key is the same as old!";
statusLabel.Text = "New key is the same as old";
statusLabel.Visible = true;
textBox1.Text = "";
textBox2.Text = "";