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; } }
private void DoTranslate() { CATALOGUES.Translate(converter); dipMusic.Translate(converter); }