-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSet.cs
More file actions
58 lines (52 loc) · 1.51 KB
/
PSet.cs
File metadata and controls
58 lines (52 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Windows.Forms;
namespace ECCryptoSystem
{
public partial class PassSet : Form
{
public KeysGen f37;
public PassSet()
{
InitializeComponent();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (first.PasswordChar == '*')
{
first.PasswordChar = '\0';
second.PasswordChar = '\0';
}
else
{
first.PasswordChar = '*';
second.PasswordChar = '*';
}
}
private void first_TextChanged(object sender, EventArgs e)
{
//
OK1.Enabled = first.Text.Length > 2 &&
first.Text.Length == second.Text.Length;
}
private void second_TextChanged(object sender, EventArgs e)
{
//
OK1.Enabled = first.Text.Length > 2 &&
first.Text.Length == second.Text.Length;
}
private void OK1_Click(object sender, EventArgs e)
{
if (first.Text == second.Text)
{
f37.pass = first.Text;
Close();
}
else
{
MessageBox.Show("Введенные пароли не совпадают!\n" +
"Попробуйте ещё раз...", "Wrong password",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}