コード例 #1
0
ファイル: GuiThumbs.cs プロジェクト: thomasr3/MediaPortal-1
        private void bttnClearBlaclistedThumbs_Click(object sender, EventArgs e)
        {
            IVideoThumbBlacklist blacklist;

            if (GlobalServiceProvider.IsRegistered <IVideoThumbBlacklist>())
            {
                blacklist = GlobalServiceProvider.Get <IVideoThumbBlacklist>();
            }
            else
            {
                blacklist = new VideoThumbBlacklistDBImpl();
                GlobalServiceProvider.Add <IVideoThumbBlacklist>(blacklist);
            }

            if (blacklist != null)
            {
                blacklist.Clear();
            }
        }
コード例 #2
0
        private void ClearBlacklistedThumbs()
        {
            IVideoThumbBlacklist blacklist;

            if (GlobalServiceProvider.IsRegistered <IVideoThumbBlacklist>())
            {
                blacklist = GlobalServiceProvider.Get <IVideoThumbBlacklist>();
            }
            else
            {
                blacklist = new VideoThumbBlacklistDBImpl();
                GlobalServiceProvider.Add <IVideoThumbBlacklist>(blacklist);
            }

            if (blacklist != null)
            {
                blacklist.Clear();
            }
        }