Example #1
0
        public IconCache LoadCache()
        {
            Monitor.Enter(_syncRoot);
            Stream          streamRead = File.OpenRead(CommonInfo.PluginsFolder);
            BinaryFormatter binaryRead = new BinaryFormatter();
            IconCache       cache      = (IconCache)binaryRead.Deserialize(streamRead);

            streamRead.Close();
            Monitor.Exit(_syncRoot);
            streamRead = null;
            binaryRead = null;
            return(cache);
        }
Example #2
0
 public IconCache(IconCache cache)
 {
     _names    = new List <string>(cache.Names);
     _icons    = new Dictionary <string, Image>(cache.Icons);
     _syncRoot = new Object();
 }
Example #3
0
 private IconManager()
 {
     _cache = new IconCache();
 }
Example #4
0
 public void Load()
 {
     _cache = LoadCache();
 }