ZeroInstall.Central.WinForms.AppTile.Dispose C# (CSharp) Method

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

Usage Example

Example #1
0
        /// <summary>
        /// Removes an application tile from the list.
        /// </summary>
        /// <param name="tile">The tile to remove.</param>
        /// <remarks>Disposes the <see cref="AppTile"/> (it cannot be reused).</remarks>
        private void RemoveTile(AppTile tile)
        {
            #region Sanity checks
            if (tile == null) throw new ArgumentNullException(nameof(tile));
            #endregion

            // Flush queue first, to allow proper recoloring
            AddQueuedTiles();

            _flowLayout.Controls.Remove(tile);
            if (tile.Visible) _flowLayout.Height -= tile.Height;
            _tileDictionary.Remove(tile.InterfaceUri);
            tile.Dispose();

            RecolorTiles();
        }
All Usage Examples Of ZeroInstall.Central.WinForms.AppTile::Dispose