コード例 #1
0
        private void AddPanel(PanelBase nestedPanel, DockState dockState, string title, DockAreas dockAreas)
        {
            WidgetPanel panel = new WidgetPanel(nestedPanel);

            panel.ShowHint  = dockState;
            panel.ShowIcon  = false;
            panel.Name      = nestedPanel.GetType().FullName;
            panel.Text      = title;
            panel.DockAreas = dockAreas;
            panel.Show(dockPanel1);

            panels.Add(nestedPanel.GetType(), panel);
        }
コード例 #2
0
        private void ActivateDockElement(Type panelType, InterfaceActivationEventArgs e)
        {
            WidgetPanel dockElement = panels[panelType];

            if (dockElement == null)
            {
                throw new InvalidOperationException("Failed to find panel for: " + panelType.ToString());
            }

            if (dockElement.DockState != DockState.Hidden)
            {
                dockElement.Activate();
                e.Handled = true;
            }
        }