Exemple #1
0
        public void RemoveDownloadableIcon(string name)
        {
            try
            {
                DownloadableIcon di = null;
                lock (this.downloadableIconList.SyncRoot)
                {
                    if (this.downloadableIconList.Contains(name))
                    {
                        di = (DownloadableIcon)this.downloadableIconList[name];
                        this.downloadableIconList.Remove(name);
                    }
                    this.returnList = new DownloadableIcon[this.downloadableIconList.Count];
                    int c = 0;
                    foreach (DownloadableIcon dicon in this.downloadableIconList.Values)
                    {
                        this.returnList[c++] = dicon;
                    }
                }

                if (this.currentlyDisplayed != null && name == this.currentlyDisplayed.Name)
                {
                    this.currentlyDisplayed = null;
                }

                if (di != null)
                {
                    di.Dispose();
                }
            }
            catch (Exception caught)
            {
                Log.Write(caught);
            }
        }
Exemple #2
0
 public override void Dispose()
 {
     this.Inited = false;
     lock (this.downloadableIconList.SyncRoot) {
         foreach (string key in this.downloadableIconList.Keys)
         {
             DownloadableIcon di = (DownloadableIcon)this.downloadableIconList[key];
             di.Dispose();
         }
     }
 }