Exemplo n.º 1
0
        private void AdminMainForm_Load(object sender, EventArgs e)
        {
            TimeWorker.RunWorkerAsync();
            MainPanel.Controls.Clear();
            AdminFunctionForm adminFunctionForm = new AdminFunctionForm(this);

            adminFunctionForm.TopLevel = false;
            adminFunctionForm.Dock     = DockStyle.Fill;
            MainPanel.Controls.Add(adminFunctionForm);
            adminFunctionForm.Show();
        }
Exemplo n.º 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();
            }
        }