コード例 #1
0
        public List <VideoMediaElement> TransformToVideoMediaCollection(int CollectionId)
        {
            List <MediaElement> mediaCollection = GetMediaCollection(CollectionId);
            string mediaFolder = GetMediaCollectionDescription(CollectionId).Location;

            List <VideoMediaElement> videoMediaCollection = new List <VideoMediaElement>();

            foreach (MediaElement mediaElement in mediaCollection)
            {
                VideoMediaElement videoMediaElement = new VideoMediaElement();
                videoMediaElement.VideoFile = "/Content/" + mediaFolder + mediaElement.File;
                videoMediaElement.ImageFile = "/Content/" + mediaFolder + Path.GetFileNameWithoutExtension(mediaElement.File) + ".jpg";
                videoMediaCollection.Add(videoMediaElement);
            }

            return(videoMediaCollection);
        }
コード例 #2
0
        public List<VideoMediaElement> TransformToVideoMediaCollection(int CollectionId)
        {
            List<MediaElement> mediaCollection = GetMediaCollection(CollectionId);
            string mediaFolder = GetMediaCollectionDescription(CollectionId).Location;

            List<VideoMediaElement> videoMediaCollection = new List<VideoMediaElement>();
            foreach (MediaElement mediaElement in mediaCollection)
            {
                VideoMediaElement videoMediaElement = new VideoMediaElement();
                videoMediaElement.VideoFile         = "/Content/" + mediaFolder + mediaElement.File;
                videoMediaElement.ImageFile         = "/Content/" + mediaFolder + Path.GetFileNameWithoutExtension(mediaElement.File) + ".jpg";
                videoMediaCollection.Add(videoMediaElement);
            }

            return videoMediaCollection;
        }