コード例 #1
0
        public OtherOwneredMylist(MylistGroup data, int sortIndex = 0)
            : this()
        {
            Id          = data.Id;
            Label       = data.Name;
            Count       = (int)data.ItemCount;
            Description = data.Description;
            SortIndex   = sortIndex;
            OwnerUserId = data.VideoInfoItems?.FirstOrDefault()?.Video.UserId;

            _ThumnailUrl = data.VideoInfoItems?.FirstOrDefault()?.Video.ThumbnailUrl.OriginalString;
        }
コード例 #2
0
        public MylistGroupListItem(MylistGroup mylistGroup)
        {
            Label       = mylistGroup.Name;
            Description = mylistGroup.Description;
            GroupId     = mylistGroup.Id;
            OptionText  = ("公開") + $" - {mylistGroup.ItemCount}件";
            ItemCount   = mylistGroup.ItemCount;

            foreach (var thumbnailUri in mylistGroup.VideoInfoItems.Take(3).Select(x => x.Video.ThumbnailUrl))
            {
                AddImageUrl(thumbnailUri.OriginalString);
            }
        }
コード例 #3
0
        public MylistSearchListingItem(MylistGroup mylistgroup, PageManager pageManager)
        {
            _PageManager = pageManager;

            Name        = mylistgroup.Name;
            Description = mylistgroup.Description;
            ItemCount   = mylistgroup.ItemCount;
            GroupId     = mylistgroup.Id;
            UpdateTime  = mylistgroup.UpdateTime;

            Title = mylistgroup.Name;
            var thumbnails = mylistgroup.VideoInfoItems?.Select(x => x.Video.ThumbnailUrl.OriginalString);

            if (thumbnails != null)
            {
                foreach (var thumbnail in thumbnails)
                {
                    ImageUrlsSource.Add(thumbnail);
                }
            }

            SampleVideos = mylistgroup.VideoInfoItems?.Select(x => x.Video).ToList() ?? new List <Mntone.Nico2.Searches.Video.Video>();
        }