mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Changed eye icon behavior
This commit is contained in:
parent
685f915767
commit
569ae5cbe1
4 changed files with 19 additions and 23 deletions
4
Crypto Notepad/ChangeKeyForm.Designer.cs
generated
4
Crypto Notepad/ChangeKeyForm.Designer.cs
generated
|
|
@ -121,7 +121,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;
|
||||
this.pictureBox2.Image = global::Crypto_Notepad.Properties.Resources.eye_half;
|
||||
this.pictureBox2.Location = new System.Drawing.Point(219, 43);
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.Size = new System.Drawing.Size(32, 20);
|
||||
|
|
@ -134,7 +134,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;
|
||||
this.pictureBox1.Image = global::Crypto_Notepad.Properties.Resources.eye_half;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(219, 9);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(32, 20);
|
||||
|
|
|
|||
|
|
@ -51,41 +51,36 @@ private async void button1_Click(object sender, EventArgs e)
|
|||
|
||||
private void pictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (textBox1.UseSystemPasswordChar == true)
|
||||
if (textBox1.UseSystemPasswordChar)
|
||||
{
|
||||
textBox1.UseSystemPasswordChar = false;
|
||||
pictureBox1.Image = Properties.Resources.eye_half;
|
||||
pictureBox1.Image = Properties.Resources.eye;
|
||||
return;
|
||||
}
|
||||
|
||||
if (textBox1.UseSystemPasswordChar == false)
|
||||
if (!textBox1.UseSystemPasswordChar)
|
||||
{
|
||||
textBox1.UseSystemPasswordChar = true;
|
||||
pictureBox1.Image = Properties.Resources.eye;
|
||||
pictureBox1.Image = Properties.Resources.eye_half;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void pictureBox2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (textBox2.UseSystemPasswordChar == true)
|
||||
if (textBox2.UseSystemPasswordChar)
|
||||
{
|
||||
textBox2.UseSystemPasswordChar = false;
|
||||
pictureBox2.Image = Properties.Resources.eye_half;
|
||||
return;
|
||||
}
|
||||
|
||||
if (textBox2.UseSystemPasswordChar == false)
|
||||
{
|
||||
textBox2.UseSystemPasswordChar = true;
|
||||
pictureBox2.Image = Properties.Resources.eye;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeKeyForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!textBox2.UseSystemPasswordChar)
|
||||
{
|
||||
textBox2.UseSystemPasswordChar = true;
|
||||
pictureBox2.Image = Properties.Resources.eye_half;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
3
Crypto Notepad/Form2.Designer.cs
generated
3
Crypto Notepad/Form2.Designer.cs
generated
|
|
@ -66,7 +66,8 @@ 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;
|
||||
this.pictureBox1.Image = global::Crypto_Notepad.Properties.Resources.eye_half;
|
||||
this.pictureBox1.InitialImage = global::Crypto_Notepad.Properties.Resources.eye_half;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(163, 39);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(18, 20);
|
||||
|
|
|
|||
|
|
@ -39,17 +39,17 @@ private void textBox1_KeyDown(object sender, KeyEventArgs e)
|
|||
|
||||
private void pictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (textBox1.UseSystemPasswordChar == true)
|
||||
if (textBox1.UseSystemPasswordChar)
|
||||
{
|
||||
textBox1.UseSystemPasswordChar = false;
|
||||
pictureBox1.Image = Properties.Resources.eye_half;
|
||||
pictureBox1.Image = Properties.Resources.eye;
|
||||
return;
|
||||
}
|
||||
|
||||
if (textBox1.UseSystemPasswordChar == false)
|
||||
if (!textBox1.UseSystemPasswordChar)
|
||||
{
|
||||
textBox1.UseSystemPasswordChar = true;
|
||||
pictureBox1.Image = Properties.Resources.eye;
|
||||
pictureBox1.Image = Properties.Resources.eye_half;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue