Пример #1
0
        public void AddManagementModulePresenter(ManagementModulePresenter modulePresenter)
        {
            PresenterStrip.Items
                .Add(modulePresenter.Text,
                     modulePresenter.Image,
                     ManagementModulePresenterSelected)
                .Tag = modulePresenter;

            var control = modulePresenter.ViewUserControl;

            control.Dock = DockStyle.Fill;
            control.Visible = false;

            SplitManagementView.Panel1.Controls.Add(control);
        }
Пример #2
0
        private void ManagementModulePresenterSelected(object sender, EventArgs e)
        {
            if (managementModulePresenter != null)
            {
                managementModulePresenter.HideView();
            }

            var item = (ToolStripItem)sender;

            managementModulePresenter = (ManagementModulePresenter)item.Tag;

            managementModulePresenter.ShowView();
        }