-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
57 lines (51 loc) · 1.62 KB
/
Form1.cs
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
using UserCreator.Frontend.PrimaryFrames;
namespace UserCreator
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
ActiveControl = CreateUserButton;
AcceptButton = CreateUserButton;
localUserConsoleTooltip.InitialDelay = 0;
localUserConsoleTooltip.IsBalloon = true;
localUserConsoleTooltip.SetToolTip(CreateUserButton, "Create a new user");
localUserConsoleTooltip.SetToolTip(UpdateUserButton, "Update an existing user");
localUserConsoleTooltip.SetToolTip(DeleteUserButton, "Delete a user");
}
private void CreateUserButton_Click(object sender, EventArgs e)
{
Hide();
Form createUserForm = new CreateUserForm();
createUserForm.ShowDialog();
if (!createUserForm.Visible)
{
Show();
}
}
private void UpdateUserButton_Click(object sender, EventArgs e)
{
Hide();
Form updateUserForm = new UpdateUserForm();
updateUserForm.ShowDialog();
if (!updateUserForm.Visible)
{
Show();
}
}
private void DeleteUserButton_Click(object sender, EventArgs e)
{
Hide();
Form deleteUserForm = new DeleteUserForm();
deleteUserForm.ShowDialog();
if (!deleteUserForm.Visible)
{
Show();
}
}
}
}