예제 #1
0
        private void CATALOGUES_OnSelectionChange(ICatalogue selected, object tag)
        {
            Catalogue         cat = selected as Catalogue;
            CatalogueSections TAG = (CatalogueSections)tag;

            switch (TAG)
            {
            case CatalogueSections.ALL_MUSIC:
                dipMusic.Clear();
                dipMusic.UseCache(true);
                break;

            case CatalogueSections.INDIVIDUAL:
                dipMusic.Clear();
                dipMusic.WaitOnUI(() =>
                {
                    foreach (MusicEntity me in cat.MusicList)
                    {
                        Dispatcher.Invoke(() => dipMusic.Add(me));
                    }
                });
                dipMusic.UseCache(false);
                break;

            case CatalogueSections.USER_PLAYLISTS:
                CATALOGUES.EmptyContent();
                break;

            case CatalogueSections.ALBUM_COLLECTIONS:
                CATALOGUES.Reset();
                List <Catalogue> catas = CPOOL.GetAlbumClassfied();
                if (catas.Count == 0)
                {
                    CATALOGUES.EmptyContent();
                }
                else
                {
                    foreach (Catalogue c in catas)
                    {
                        CATALOGUES.Add(c);
                    }
                }
                break;

            case CatalogueSections.ARTIST_COLLECTIONS:
                CATALOGUES.Reset();
                List <Catalogue> art_catas = CPOOL.GetArtistClassfied();
                if (art_catas.Count == 0)
                {
                    CATALOGUES.EmptyContent();
                }
                else
                {
                    foreach (Catalogue c in art_catas)
                    {
                        CATALOGUES.Add(c);
                    }
                }
                break;
            }
        }
예제 #2
0
 private void DoTranslate()
 {
     CATALOGUES.Translate(converter);
     dipMusic.Translate(converter);
 }