Esempio n. 1
0
        async void AlbumPage_Loaded(object sender, RoutedEventArgs e)
        {
            var    loader = new Windows.ApplicationModel.Resources.ResourceLoader();
            string track  = loader.GetString("Track");
            string tracks = loader.GetString("Tracks");

            ConnectionManager.ManageSystemTray(true);
            Filter filter = new Filter {
                Field = "album", Operator = "is", value = GlobalVariables.CurrentAlbum.Title
            };
            Sort sort = new Sort {
                Method = "track", Order = "ascending", IgnoreArticle = true
            };

            songsInAlbum = await AudioLibrary.GetSongs(filter : filter, sort : sort);

            SongsListView.ItemsSource = songsInAlbum;

            TrackCountTextBlock.Text = songsInAlbum.Count.ToString();
            TracksTextBlock.Text     = songsInAlbum.Count > 1 ? tracks : track;

            currentAlbum = await AudioLibrary.GetAlbumDetails(GlobalVariables.CurrentAlbum.AlbumId);

            AlbumInfoGrid.DataContext = currentAlbum;
            ConnectionManager.ManageSystemTray(false);
        }
Esempio n. 2
0
        private async void ReloadAll()
        {
            ConnectionManager.ManageSystemTray(true);
            allArtists = await AudioLibrary.GetArtists();

            var groupedAllArtists = GroupingHelper.GroupList(allArtists, (Artist a) => a.Label, true);

            ArtistsCVS.Source = groupedAllArtists;
            (ArtistsSemanticZoom.ZoomedOutView as ListViewBase).ItemsSource = ArtistsCVS.View.CollectionGroups;

            Sort sort = new Sort {
                Method = "label", Order = "ascending", IgnoreArticle = true
            };

            allAlbums = await AudioLibrary.GetAlbums(sort : sort);

            var groupedAllAlbums = GroupingHelper.GroupList(allAlbums, (Album a) => a.Label, true);

            AlbumsCVS.Source = groupedAllAlbums;
            (AlbumsSemanticZoom.ZoomedOutView as ListViewBase).ItemsSource = AlbumsCVS.View.CollectionGroups;

            allSongs = await AudioLibrary.GetSongs(sort : sort);

            var groupedAllSongs = GroupingHelper.GroupList(allSongs, (Song s) => s.Label, true);

            SongsCVS.Source = groupedAllSongs;
            (SongsSemanticZoom.ZoomedOutView as ListViewBase).ItemsSource = SongsCVS.View.CollectionGroups;

            ConnectionManager.ManageSystemTray(false);
        }
Esempio n. 3
0
        private async void SearchAndReload(string query)
        {
            ConnectionManager.ManageSystemTray(true);

            Filter artistFilter = new Filter {
                Field = "artist", Operator = "contains", value = query
            };
            Sort artistSort = new Sort {
                Method = "artist", Order = "ascending", IgnoreArticle = true
            };

            ArtistSearchListView.ItemsSource = await AudioLibrary.GetArtists(artistFilter, sort : artistSort);

            Filter albumFilter = new Filter {
                Field = "album", Operator = "contains", value = query
            };
            Sort albumSort = new Sort {
                Method = "album", Order = "ascending", IgnoreArticle = true
            };

            AlbumSearchGridView.ItemsSource = await AudioLibrary.GetAlbums(albumFilter, sort : albumSort);

            Filter songFilter = new Filter {
                Field = "title", Operator = "contains", value = query
            };
            Sort songSort = new Sort {
                Method = "title", Order = "ascending", IgnoreArticle = true
            };

            SongsSearchListView.ItemsSource = await AudioLibrary.GetSongs(songFilter, sort : songSort);

            ConnectionManager.ManageSystemTray(false);
        }
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            JObject filter = new JObject(new JProperty("artistid", GlobalVariables.CurrentArtist.ArtistId));

            songsList = await AudioLibrary.GetSongs(filter);

            SongsLLS.ItemsSource = songsList;
            albumsList           = await AudioLibrary.GetAlbums(filter);

            AlbumsLLS.ItemsSource = albumsList;
            base.OnNavigatedTo(e);
        }
        private async void ReloadAll()
        {
            Filter filter = new Filter {
                Field = "artist", Operator = "is", value = GlobalVariables.CurrentArtist.ArtistName
            };

            songsList = await AudioLibrary.GetSongs(filter);

            SongsHubSection.DataContext = songsList;
            albumsList = await AudioLibrary.GetAlbums(filter);

            AlbumsHubSection.DataContext = albumsList;
        }
Esempio n. 6
0
        async void AlbumPage_Loaded(object sender, RoutedEventArgs e)
        {
            ConnectionManager.ManageSystemTray(true);
            JObject filter = new JObject(new JProperty("albumid", GlobalVariables.CurrentAlbumId));

            songsInAlbum = await AudioLibrary.GetSongs(filter);

            SongsLLS.ItemsSource = songsInAlbum;

            currentAlbum = await AudioLibrary.GetAlbumDetails(GlobalVariables.CurrentAlbumId);

            AlbumInfoGrid.DataContext = currentAlbum;
            ConnectionManager.ManageSystemTray(false);
        }
Esempio n. 7
0
        async void AlbumPage_Loaded(object sender, RoutedEventArgs e)
        {
            ConnectionManager.ManageSystemTray(true);
            Filter filter = new Filter {
                Field = "album", Operator = "is", value = GlobalVariables.CurrentAlbum.Title
            };
            Sort sort = new Sort {
                Method = "track", Order = "ascending", IgnoreArticle = true
            };

            songsInAlbum = await AudioLibrary.GetSongs(filter : filter, sort : sort);

            SongsListView.ItemsSource = songsInAlbum;

            currentAlbum = await AudioLibrary.GetAlbumDetails(GlobalVariables.CurrentAlbum.AlbumId);

            this.DataContext = currentAlbum;
            ConnectionManager.ManageSystemTray(false);
        }
Esempio n. 8
0
        private async void ReloadAll()
        {
            ConnectionManager.ManageSystemTray(true);
            allArtists = await AudioLibrary.GetArtists();

            var groupedAllArtists = GroupingHelper.GroupList(allArtists, (Artist a) => { return(a.Label); }, true);

            AllArtistsLLS.ItemsSource = groupedAllArtists;

            JObject sortWith = new JObject(new JProperty("method", "label"));

            allAlbums = await AudioLibrary.GetAlbums(sort : sortWith);

            var groupedAllAlbums = GroupingHelper.GroupList(allAlbums, (Album a) => { return(a.Label); }, true);

            AllAlbumsLLS.ItemsSource = groupedAllAlbums;

            allSongs = await AudioLibrary.GetSongs(sort : sortWith);

            var groupedAllSongs = GroupingHelper.GroupList(allSongs, (Song s) => { return(s.Label); }, true);

            AllSongsLLS.ItemsSource = groupedAllSongs;
            ConnectionManager.ManageSystemTray(false);
        }