private void openSubMenu(BaseSubMenu childForm, Settings_Mode mode) { if (activeForm != null) { activeForm.Close(); } activeForm = childForm; childForm.TopLevel = false; childForm.FormBorderStyle = FormBorderStyle.None; childForm.Dock = DockStyle.Fill; panelSettings.Controls.Add(childForm); panelSettings.Tag = childForm; childForm.BringToFront(); childForm.Show(); }
private void openSubMenu(BaseSubMenu childForm, Settings_Mode mode) { if (activeForm != null) { activeForm.Close(); } activeForm = childForm; childForm.TopLevel = false; childForm.FormBorderStyle = FormBorderStyle.None; childForm.Dock = DockStyle.Fill; panelSettings.AutoScrollMinSize = new Size(0, childForm.Height); panelSettings.Controls.Add(childForm); panelSettings.Tag = childForm; childForm.BringToFront(); childForm.Show(); if (mode == Settings_Mode.Server) { openActionBar(new ServerActionBar(this)); } else { openActionBar(new DriverActionBar(savedConfig, userConfig, this, activeForm)); } }