Пример #1
0
        private void UserManageButton_Click(object sender, EventArgs e)
        {
            frmMain.MainPanel.Controls.Clear();
            AdminUserManageForm userManageForm = new AdminUserManageForm(frmMain);

            userManageForm.TopLevel = false;
            userManageForm.Dock     = DockStyle.Fill;
            frmMain.MainPanel.Controls.Add(userManageForm);
            userManageForm.Show();
        }
Пример #2
0
        private void ReturnButton_Click(object sender, EventArgs e)
        {
            int v = (int)ReturnButton.Tag;

            if (v == 1)
            {
                ClassBackEnd.ClearBookList();
                MainPanel.Controls.Clear();
                AdminFunctionForm adminFunctionForm = new AdminFunctionForm(this);
                adminFunctionForm.TopLevel = false;
                adminFunctionForm.Dock     = DockStyle.Fill;
                MainPanel.Controls.Add(adminFunctionForm);
                adminFunctionForm.Show();
            }
            else if (v == 2)
            {
                MainPanel.Controls.Clear();
                AdminBookManageForm bookManageForm = new AdminBookManageForm(this);
                bookManageForm.TopLevel = false;
                bookManageForm.Dock     = DockStyle.Fill;
                MainPanel.Controls.Add(bookManageForm);
                bookManageForm.Show();
            }
            else if (v == 3)
            {
                MainPanel.Controls.Clear();
                AdminUserManageForm userManageForm = new AdminUserManageForm(this);
                userManageForm.TopLevel = false;
                userManageForm.Dock     = DockStyle.Fill;
                MainPanel.Controls.Add(userManageForm);
                userManageForm.Show();
            }
            else if (v == 4)
            {
                MainPanel.Controls.Clear();
                AdminUserDetailForm userDetailAdminForm = new AdminUserDetailForm(this, AdminUserDetailForm.UserIndex);
                userDetailAdminForm.TopLevel = false;
                userDetailAdminForm.Dock     = DockStyle.Fill;
                MainPanel.Controls.Add(userDetailAdminForm);
                userDetailAdminForm.Show();
            }
        }