mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Changed some strings
This commit is contained in:
parent
e96ea97599
commit
a868229079
2 changed files with 21 additions and 8 deletions
|
|
@ -12,19 +12,33 @@ public ChangeKeyForm()
|
|||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (textBox1.Text == MainWindow.key)
|
||||
if (textBox1.Text == MainWindow.key & textBox1.Text != textBox2.Text)
|
||||
{
|
||||
MainWindow.key = textBox2.Text;
|
||||
MainWindow.keyChanged = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
else if (textBox1.Text != MainWindow.key)
|
||||
if (textBox1.Text != MainWindow.key)
|
||||
{
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
MessageBox.Show("Wrong old key!");
|
||||
MessageBox.Show("Invalid old key!", "Change Key", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
textBox1.Text = "";
|
||||
textBox2.Text = "";
|
||||
return;
|
||||
}
|
||||
|
||||
if (textBox1.Text == textBox2.Text)
|
||||
{
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
MessageBox.Show("New key the same as old!", "Change Key", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
textBox1.Text = "";
|
||||
textBox2.Text = "";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void DecryptAES()
|
|||
{
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("Wrong key!", "Crypto Notepad", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
|
||||
DialogResult dialogResult = MessageBox.Show("Invalid key!", "Crypto Notepad", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
|
||||
if (dialogResult == DialogResult.Retry)
|
||||
{
|
||||
DecryptAES();
|
||||
|
|
@ -160,7 +160,7 @@ private void openAsotiations()
|
|||
|
||||
catch
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("Wrong key!", "Crypto Notepad", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
|
||||
DialogResult dialogResult = MessageBox.Show("Invalid key!", "Crypto Notepad", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
|
||||
if (dialogResult == DialogResult.Retry)
|
||||
{
|
||||
openAsotiations();
|
||||
|
|
@ -950,14 +950,13 @@ private void pictureBox1_MouseLeave(object sender, EventArgs e)
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AutoLock(bool minimize)
|
||||
{
|
||||
string saveText = customRTB.Text;
|
||||
Form2 f2 = new Form2();
|
||||
key = "";
|
||||
this.Hide();
|
||||
|
||||
if (minimize == true)
|
||||
{
|
||||
f2.WindowState = FormWindowState.Minimized;
|
||||
|
|
@ -993,7 +992,7 @@ void AutoLock(bool minimize)
|
|||
}
|
||||
catch (CryptographicException)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("Wrong key!", "Crypto Notepad", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
|
||||
DialogResult dialogResult = MessageBox.Show("Invalid key!", "Crypto Notepad", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
|
||||
if (dialogResult == DialogResult.Retry)
|
||||
{
|
||||
AutoLock(false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue