Ejemplo n.º 1
0
        public PlaylistItem AddVideo(string contentId, string contentName = null, ContentInsertPosition insertPosition = ContentInsertPosition.Tail)
        {
            if (contentId == null)
            {
                throw new Exception();
            }

            // すでに登録済みの場合
            var alreadyAdded = _PlaylistItems.SingleOrDefault(x => x.Type == PlaylistItemType.Video && x.ContentId == contentId);

            if (alreadyAdded != null)
            {
                // 何もしない
                return(alreadyAdded);
            }

            var newItem = new QualityVideoPlaylistItem()
            {
                Type      = PlaylistItemType.Video,
                ContentId = contentId,
                Title     = contentName,
                Quality   = null,
                Owner     = this,
            };

            if (insertPosition == ContentInsertPosition.Head)
            {
                _PlaylistItems.Insert(0, newItem);
            }
            else
            {
                _PlaylistItems.Add(newItem);
            }


            HohoemaPlaylist.Save(this).ConfigureAwait(false);

            return(newItem);
        }
Ejemplo n.º 2
0
        public PageManager(HohoemaApp hohoemaApp, INavigationService ns, AppearanceSettings appearanceSettings, HohoemaPlaylist playlist)
        {
            HohoemaApp         = hohoemaApp;
            NavigationService  = ns;
            AppearanceSettings = appearanceSettings;
            HohoemaPlaylist    = playlist;

            CurrentPageType = HohoemaPageType.RankingCategoryList;
        }
Ejemplo n.º 3
0
        public PageManager(HohoemaApp hohoemaApp, INavigationService ns, AppearanceSettings appearanceSettings, HohoemaPlaylist playlist, HohoemaViewManager viewMan, HohoemaDialogService dialogService)
        {
            HohoemaApp            = hohoemaApp;
            NavigationService     = ns;
            AppearanceSettings    = appearanceSettings;
            HohoemaPlaylist       = playlist;
            HohoemaViewManager    = viewMan;
            _HohoemaDialogService = dialogService;


            CurrentPageType = HohoemaPageType.RankingCategoryList;
        }