/// <summary>
        /// Initializes a new instance of the <see cref="ImageListViewCacheThumbnail"/> class.
        /// </summary>
        /// <param name="owner">The owner control.</param>
        public ImageListViewCacheThumbnail(ImageListView owner)
        {
            context                = null;
            bw                     = new QueuedBackgroundWorker();
            bw.ProcessingMode      = ProcessingMode.LIFO;
            bw.IsBackground        = true;
            bw.DoWork             += bw_DoWork;
            bw.RunWorkerCompleted += bw_RunWorkerCompleted;

            checkProcessingCallback = new SendOrPostCallback(CanContinueProcessing);

            mImageListView        = owner;
            diskCache             = new DiskCache(string.Empty, 100 * 1024 * 1024, DiskCache.SyncBehavior.SyncNone, 32);
            CacheMode             = CacheMode.OnDemand;
            CacheLimitAsItemCount = 0;
            CacheLimitAsMemory    = 20 * 1024 * 1024;
            RetryOnError          = false;

            thumbCache             = new Dictionary <Guid, CacheItem>();
            editCache              = new Dictionary <Guid, bool>();
            processing             = new Dictionary <Guid, bool>();
            processingRendererItem = Guid.Empty;
            processingGalleryItem  = Guid.Empty;

            rendererItem = null;
            galleryItem  = null;

            MemoryUsed          = 0;
            MemoryUsedByRemoved = 0;
            removedItems        = new List <Guid>();

            disposed = false;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ImageListViewCacheThumbnail"/> class.
        /// </summary>
        /// <param name="owner">The owner control.</param>
        public ImageListViewCacheThumbnail(ImageListView owner)
        {
            context = null;
            bw = new QueuedBackgroundWorker();
            bw.ProcessingMode = ProcessingMode.LIFO;
            bw.IsBackground = true;
            bw.DoWork += bw_DoWork;
            bw.RunWorkerCompleted += bw_RunWorkerCompleted;

            checkProcessingCallback = new SendOrPostCallback(CanContinueProcessing);

            mImageListView = owner;
            diskCache = new DiskCache(string.Empty, 100 * 1024 * 1024, DiskCache.SyncBehavior.SyncNone, 32);
            CacheMode = CacheMode.OnDemand;
            CacheLimitAsItemCount = 0;
            CacheLimitAsMemory = 20 * 1024 * 1024;
            RetryOnError = false;

            thumbCache = new Dictionary<Guid, CacheItem>();
            editCache = new Dictionary<Guid, bool>();
            processing = new Dictionary<Guid, bool>();
            processingRendererItem = Guid.Empty;
            processingGalleryItem = Guid.Empty;

            rendererItem = null;
            galleryItem = null;

            MemoryUsed = 0;
            MemoryUsedByRemoved = 0;
            removedItems = new List<Guid>();

            disposed = false;
        }