Crypto-Notepad/EncryptPad/ChangeKeyForm.cs
2016-01-07 18:45:32 +02:00

64 lines
1.6 KiB
C#

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 EncryptPad
{
public partial class ChangeKeyForm : Form
{
public ChangeKeyForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == MainWindow.key)
{
MainWindow.key = textBox2.Text;
this.Close();
}
else if (textBox1.Text != MainWindow.key)
{
MessageBox.Show("Wrong old key!");
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
if (textBox1.UseSystemPasswordChar == true)
{
textBox1.UseSystemPasswordChar = false;
return;
}
if (textBox1.UseSystemPasswordChar == false)
{
textBox1.UseSystemPasswordChar = true;
return;
}
}
private void pictureBox2_Click(object sender, EventArgs e)
{
if (textBox2.UseSystemPasswordChar == true)
{
textBox2.UseSystemPasswordChar = false;
return;
}
if (textBox2.UseSystemPasswordChar == false)
{
textBox2.UseSystemPasswordChar = true;
return;
}
}
}
}