FarsiLibrary.Win.FATabStripItem.Dispose C# (CSharp) Method

Dispose() protected method

Handles proper disposition of the tab page control.
protected Dispose ( bool disposing ) : void
disposing bool
return void
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if(disposing)
            {
                if(image != null)
                    image.Dispose();
            }
        }

Usage Example

コード例 #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         this.items.CollectionChanged -= this.OnCollectionChanged;
         this.menu.ItemClicked        -= this.OnMenuItemClicked;
         this.menu.VisibleChanged     -= this.OnMenuVisibleChanged;
         foreach (object obj in this.items)
         {
             FATabStripItem fatabStripItem = (FATabStripItem)obj;
             if (fatabStripItem != null && !fatabStripItem.IsDisposed)
             {
                 fatabStripItem.Dispose();
             }
         }
         if (this.menu != null && !this.menu.IsDisposed)
         {
             this.menu.Dispose();
         }
         if (this.sf != null)
         {
             this.sf.Dispose();
         }
     }
     base.Dispose(disposing);
 }