public int GetImageIndex(string extension, OverlayImage overlay)
        {
            if (extension == null)
                throw new ArgumentNullException("extension");

            extension = extension.ToLowerInvariant();

            int imageIndex;
            if (!_imageCache.TryGetValue(extension, out imageIndex))
            {
                imageIndex = _imageList.GetIndexForFileName("dummy" + extension);
                _imageCache.Add(extension, imageIndex);
            }

            int overlayIndex;
            if (_overlays.TryGetValue(overlay, out overlayIndex))
                return _imageList.GetIndexForOverlay(imageIndex, overlayIndex);

            return imageIndex;
        }
 public void AddActiveArea(Rectangle area, Bitmap infoImage)
 {
     OverlayImage info = new OverlayImage(infoImage, .2f, .2f, mWhereWindow);
     CameraPositionTrigger trigger = new CameraPositionTrigger(Manager.Coordinator);
     mActiveAreas.Add(trigger);
     trigger.Triggered += () => {
         mInfoImages.Add(info);
         mWhereButton.Active = true;
     };
     trigger.Left += () => {
         mInfoImages.Remove(info);
         mWhereButton.Active = mInfoImages.Count > 0;
     };
 }