Beispiel #1
0
 private static Bitmap GetBitmap(Cache.CacheType cacheType, string name, IconGenerator.IconType type,
                                 int size, Color borderColor, float borderWidth, out Cache cache)
 {
     SetIconGeneratorSettings(type, size, borderColor, borderWidth);
     cache = CreateCache(cacheType, name);
     if (BitmapCache.ContainsKey(cache))
     {
         return(BitmapCache[cache]);                                //Bitmap has been created already, return it.
     }
     //Bitmap has been created yet, so lets create it and cache it.
     return(BitmapCache[cache] = IconGenerator.GetIcon(name)); // All done, returning sprite.
 }