DataGridViewAutoFilter.MultiSelectHeaderList.Dispose C# (CSharp) Метод

Dispose() защищенный Метод

Verwendete Ressourcen bereinigen.
protected Dispose ( bool disposing ) : void
disposing bool True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
Результат void
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Hides the drop-down filter list.
        /// </summary>
        override protected void HideFilterControl()
        {
            if (filterControlShowing)
            {
                filterControlShowing = false;

                Debug.Assert(this.DataGridView != null, "DataGridView is null");

                // Hide dropDownListBox.FilterListBox, remove handlers from its events, and remove
                // it from the DataGridView control.
                UnhandleDropDownListBoxEvents();

                filterWindow.Visible = false;
                filterWindow.Dispose();
                filterWindow = null;

                //this.DataGridView.Controls.Remove(multiSelectBox);

                // Invalidate the cell so that the drop-down button will repaint
                // in the unpressed state.
                this.DataGridView.InvalidateCell(this);
                this.DataGridView.Focus();
            }
        }