Пример #1
0
        private void menuItemBtn_Click(object sender, EventArgs e)
        {
            MenuItemForm objForm = new MenuItemForm
            {
                TopLevel = false
            };

            this.Controls.Clear();
            this.Controls.Add(objForm);
            objForm.FormBorderStyle = FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
        private void itemssBtn_Click(object sender, EventArgs e)
        {
            Menu         menuType     = controller.GetMenuType(int.Parse(IdText.Text));
            MenuItemForm menuItemForm = new MenuItemForm(menuType)
            {
                TopLevel = false
            };

            this.Controls.Clear();
            this.Controls.Add(menuItemForm);
            menuItemForm.FormBorderStyle = FormBorderStyle.None;
            menuItemForm.Dock            = DockStyle.Fill;
            menuItemForm.Show();
        }