This repository has been archived by the owner on Sep 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeleteMenu.cs
74 lines (67 loc) · 1.97 KB
/
deleteMenu.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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;
using System.Data.SqlClient;
using System.Threading;
namespace Bookstore
{
public partial class deleteMenu : Form
{
string username;
public deleteMenu(string loginUsername)
{
InitializeComponent();
username = loginUsername;
}
public Form activeForm = null;
public void openChildForm(Form childForm)
{
if (activeForm != null)
activeForm.Close();
activeForm = childForm;
childForm.TopLevel = false;
childForm.FormBorderStyle = FormBorderStyle.None;
childForm.Dock = DockStyle.Fill;
panelChildForm.Controls.Add(childForm);
panelChildForm.Tag = childForm;
childForm.BringToFront();
childForm.Show();
}
private void tabControl1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
this.Hide();
menuForm menuForm = new menuForm(null);
menuForm.Show();
}
}
private void button1_Click(object sender, EventArgs e)
{
panel2.Hide();
openChildForm(new deleteProvider());
}
private void button3_Click(object sender, EventArgs e)
{
panel2.Hide();
openChildForm(new newAuthor());
}
private void button2_Click(object sender, EventArgs e)
{
panel2.Hide();
openChildForm(new deleteWhereNumber());
}
private void deleteMenu_FormClosed(object sender, FormClosedEventArgs e)
{
this.Hide();
menuForm menuForm = new menuForm(username);
menuForm.Show();
}
}
}