Beispiel #1
0
        private void HideImageOrSlideshow(IReadOnlyCollection <MediaItem> mediaItems)
        {
            var imageItem = mediaItems?.SingleOrDefault(
                x => x.MediaType.Classification == MediaClassification.Image ||
                x.MediaType.Classification == MediaClassification.Slideshow);

            if (imageItem != null)
            {
                switch (imageItem.MediaType.Classification)
                {
                case MediaClassification.Image:
                    _imageDisplayManager.HideSingleImage(imageItem.Id);
                    break;

                case MediaClassification.Slideshow:
                    _imageDisplayManager.StopSlideshow(imageItem.Id);
                    break;
                }
            }
        }