Ejemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                m_dockState = DockState.Unknown;

                if (NestedPanesContainer != null)
                {
                    NestedPanesContainer.NestedPanes.Remove(this);
                }

                if (DockPanel != null)
                {
                    DockPanel.RemovePane(this);
                    m_dockPanel = null;
                }

                Splitter.Dispose();
                if (m_autoHidePane != null)
                {
                    m_autoHidePane.Dispose();
                }
            }
            base.Dispose(disposing);
        }
Ejemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            // IMPORTANT: avoid nested call into this method on Mono.
            // https://github.com/dockpanelsuite/dockpanelsuite/issues/16
            if (!NativeMethods.ShouldUseWin32() && m_inDisposing)
            {
                return;
            }

            if (!NativeMethods.ShouldUseWin32())
            {
                m_inDisposing = true;
            }

            if (disposing)
            {
                m_dockState = DockState.Unknown;

                if (NestedPanesContainer != null)
                {
                    NestedPanesContainer.NestedPanes.Remove(this);
                }

                if (DockPanel != null)
                {
                    DockPanel.RemovePane(this);
                    m_dockPanel = null;
                }

                Splitter.Dispose();
                if (m_autoHidePane != null)
                {
                    m_autoHidePane.Dispose();
                }
            }
            base.Dispose(disposing);
        }