Changed show/hide buttons icons

This commit is contained in:
Sigmanor 2016-01-11 19:27:24 +02:00
parent 0451223a13
commit 89c4beafd6
3 changed files with 9 additions and 7 deletions

View file

@ -87,7 +87,7 @@ private void InitializeComponent()
//
this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox2.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox2.Image = global::Crypto_Notepad.Properties.Resources.eye_icon;
this.pictureBox2.Image = global::Crypto_Notepad.Properties.Resources.eye;
this.pictureBox2.Location = new System.Drawing.Point(185, 50);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(32, 20);
@ -100,7 +100,7 @@ private void InitializeComponent()
//
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox1.Image = global::Crypto_Notepad.Properties.Resources.eye_icon;
this.pictureBox1.Image = global::Crypto_Notepad.Properties.Resources.eye;
this.pictureBox1.Location = new System.Drawing.Point(185, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 20);

View file

@ -49,7 +49,7 @@ private void InitializeComponent()
// button1
//
this.button1.Enabled = false;
this.button1.Location = new System.Drawing.Point(84, 40);
this.button1.Location = new System.Drawing.Point(70, 41);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
@ -61,11 +61,11 @@ private void InitializeComponent()
//
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox1.Image = global::Crypto_Notepad.Properties.Resources.eye_icon;
this.pictureBox1.Image = global::Crypto_Notepad.Properties.Resources.eye;
this.pictureBox1.Location = new System.Drawing.Point(127, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 20);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pictureBox1.Size = new System.Drawing.Size(18, 20);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 3;
this.pictureBox1.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox1, "Show key");
@ -75,7 +75,7 @@ private void InitializeComponent()
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(173, 73);
this.ClientSize = new System.Drawing.Size(158, 73);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);

View file

@ -41,12 +41,14 @@ private void pictureBox1_Click(object sender, EventArgs e)
if (textBox1.UseSystemPasswordChar == true)
{
textBox1.UseSystemPasswordChar = false;
pictureBox1.Image = Properties.Resources.eye_half;
return;
}
if (textBox1.UseSystemPasswordChar == false)
{
textBox1.UseSystemPasswordChar = true;
pictureBox1.Image = Properties.Resources.eye;
return;
}
}