Example #1
0
        protected override void OnTermination()
        {
            if (annotPanel != null)
            {
                ChartControl.Controls.Remove(annotPanel); annotPanel.Dispose();
            }
            if (theSplitter != null)
            {
                ChartControl.Controls.Remove(theSplitter); theSplitter.Dispose();
            }

            if (strip != null)
            {
                strip.Items.Remove(hideBtn);
                hideBtn.Dispose();
            }

            dgv              = null;
            theSplitter      = null;
            strip            = null;
            hideBtn          = null;
            newBtn           = null;
            reorgBtn         = null;
            didWell          = null;
            needsImprovement = null;
            base.OnTermination();
        }
Example #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // IMPORTANT: avoid nested call into this method on Mono.
                // https://github.com/dockpanelsuite/dockpanelsuite/issues/16
                if (Win32Helper.IsRunningOnMono)
                {
                    if (_mIsDisposing)
                    {
                        return;
                    }

                    _mIsDisposing = true;
                }

                _mDockState = DockState.Unknown;

                NestedPanesContainer?.NestedPanes.Remove(this);

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

                Splitter.Dispose();
                AutoHidePane?.Dispose();
            }
            base.Dispose(disposing);
        }