SetIsActiveDocumentPane() private méthode

private SetIsActiveDocumentPane ( bool value ) : void
value bool
Résultat void
            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);
            }
            private void SetActiveDocumentPane()
            {
                DockPane value = null;

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

                if (value == null)
                {
                    // Todo Bugfix Application breaks often at constructor initialization because:
                    if (DockPanel.DockWindows == null)
                    {
                        value = null;
                    }
                    else
                    // End Bugfix
                    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);
                }
            }
            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);
            }