Crypto-Notepad/Crypto Notepad/ChangeKeyForm.cs

69 lines
1.7 KiB
C#
Raw Normal View History

2016-01-07 16:45:32 +00:00
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;
2016-01-09 20:46:25 +00:00
namespace Crypto_Notepad
2016-01-07 16:45:32 +00:00
{
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;
MainWindow.keyChanged = true;
2016-01-07 16:45:32 +00:00
this.Close();
}
else if (textBox1.Text != MainWindow.key)
2016-01-07 16:45:32 +00:00
{
using (new CenterWinDialog(this))
{
MessageBox.Show("Wrong old key!");
}
2016-01-07 16:45:32 +00:00
}
}
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;
}
}
}
}