示例#1
0
            private void SetActiveDocumentPane()
            {
                DockPane value = null;

                if (ActivePane != null && ActivePane.DockState == DockState.Document)
                {
                    value = ActivePane;
                }

                if (value == null && DockPanel.DockWindows != null)
                {
                    if (ActiveDocumentPane == null)
                    {
                        value = DockPanel.DockWindows[DockState.Document].DefaultPane;
                    }
                    else if (ActiveDocumentPane.DockPanel != DockPanel || ActiveDocumentPane.DockState != DockState.Document)
                    {
                        value = DockPanel.DockWindows[DockState.Document].DefaultPane;
                    }
                    else
                    {
                        value = ActiveDocumentPane;
                    }
                }

                if (m_activeDocumentPane == value)
                {
                    return;
                }

                if (m_activeDocumentPane != null)
                {
                    m_activeDocumentPane.SetIsActiveDocumentPane(false);
                }

                m_activeDocumentPane = value;

                if (m_activeDocumentPane != null)
                {
                    m_activeDocumentPane.SetIsActiveDocumentPane(true);
                }
            }