Exemplo n.º 1
0
 public PicturesServices(User pUser)
 {
     _manager = new PicturesManager(pUser);
 }
Exemplo n.º 2
0
 public PicturesServices(string pDatabase)
 {
     _manager = new PicturesManager(pDatabase);
 }
Exemplo n.º 3
0
        private Bitmap CheckCache(PicturesManager.PictureInfo pPicture)
        {
            string cachekey = pPicture.Group + "@_" + pPicture.Id + ":" + pPicture.SubId;
            if (_ThumbnailsCache.ContainsKey(cachekey))
            {
                return (Bitmap)_ThumbnailsCache[cachekey];
            }

            MemoryStream stream = new MemoryStream(pPicture.Binary);
            Bitmap image = new Bitmap(stream);
            _ThumbnailsCache.Add(cachekey, image);
            return image;
        }