ComponentFactory.Krypton.Ribbon.KryptonRibbonGroupLinesDesigner.Dispose C# (CSharp) Method

Dispose() protected method

Releases all resources used by the component.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    // Unhook from events
                    _ribbonLines.DesignTimeAddButton -= new EventHandler(OnAddButton);
                    _ribbonLines.DesignTimeAddColorButton -= new EventHandler(OnAddColorButton);
                    _ribbonLines.DesignTimeAddCheckBox -= new EventHandler(OnAddCheckBox);
                    _ribbonLines.DesignTimeAddRadioButton -= new EventHandler(OnAddRadioButton);
                    _ribbonLines.DesignTimeAddLabel -= new EventHandler(OnAddLabel);
                    _ribbonLines.DesignTimeAddCustomControl -= new EventHandler(OnAddCustomControl);
                    _ribbonLines.DesignTimeAddCluster -= new EventHandler(OnAddCluster);
                    _ribbonLines.DesignTimeAddTextBox -= new EventHandler(OnAddTextBox);
                    _ribbonLines.DesignTimeAddMaskedTextBox -= new EventHandler(OnAddMaskedTextBox);
                    _ribbonLines.DesignTimeAddRichTextBox -= new EventHandler(OnAddRichTextBox);
                    _ribbonLines.DesignTimeAddComboBox -= new EventHandler(OnAddComboBox);
                    _ribbonLines.DesignTimeAddNumericUpDown -= new EventHandler(OnAddNumericUpDown);
                    _ribbonLines.DesignTimeAddDomainUpDown -= new EventHandler(OnAddDomainUpDown);
                    _ribbonLines.DesignTimeAddDateTimePicker -= new EventHandler(OnAddDateTimePicker);
                    _ribbonLines.DesignTimeContextMenu -= new MouseEventHandler(OnContextMenu);
                    _ribbonLines.DesignTimeAddTrackBar -= new EventHandler(OnAddTrackBar);
                    _changeService.ComponentRemoving -= new ComponentEventHandler(OnComponentRemoving);
                    _changeService.ComponentChanged -= new ComponentChangedEventHandler(OnComponentChanged);
                }
            }
            finally
            {
                // Must let base class do standard stuff
                base.Dispose(disposing);
            }
        }