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
        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. 3
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);
        }