예제 #1
0
        private void AddToPlaylistExecute(BaseEntry item)
        {
            try
            {
                List <Song> addToPlaylistSongs = null;
                if (item is Artist)
                {
                    var artist = item as Artist;
                    if (artist.Songs.Count > 0)
                    {
                        addToPlaylistSongs = artist.Songs.Where(p => (!p.IsTemp)).ToList();
                    }
                }
                else if (item is Album)
                {
                    var album = item as Album;
                    if (album.Songs.Count > 0)
                    {
                        addToPlaylistSongs = album.Songs.Where(p => (!p.IsTemp)).ToList();
                    }
                }
                if (addToPlaylistSongs != null && addToPlaylistSongs.Count > 0)
                {
                    AddToPlaylistPage.songs = addToPlaylistSongs;
                    SheetUtility.OpenAddToPlaylistPage();
                }
            }

            catch (Exception)
            {
            }
        }
예제 #2
0
 public static void AddToPlaylist(List <Song> songs)
 {
     //var song = songs.Select(m => m as Song).ToList();
     //if (song.Count == 0) return;
     AddToPlaylistPage.songs = songs;
     SheetUtility.OpenAddToPlaylistPage();
 }
예제 #3
0
        private async void ViewInCollectionCommandExecute(Song obj)
        {
            App.Locator.CollectionSearch.ClearCollectionSeachData();
            await System.Threading.Tasks.Task.Delay(10);

            SheetUtility.CloseSearchCollectionPage();
            int id = App.Locator.CollectionService.Artists.Where(p => p.Id == obj.Artist.Id).FirstOrDefault().Id;

            App.Navigator.GoTo <CollectionArtistPage, ZoomInTransition>(id);
        }
예제 #4
0
 //to be performed
 private void EditMetadataExecute(object obj)
 {
     if (obj is Data.Spotify.Models.SimpleTrack)
     {
         SheetUtility.OpenEditTrackMetadataPage(obj as Data.Spotify.Models.SimpleTrack);
     }
     else if (obj is Data.Model.WebSongs.WebSong)
     {
         SheetUtility.OpenEditTrackMetadataPage(obj as Data.Model.WebSongs.WebSong);
     }
     else if (obj is IF.Lastfm.Core.Objects.LastTrack)
     {
         SheetUtility.OpenEditTrackMetadataPage(obj as IF.Lastfm.Core.Objects.LastTrack);
     }
 }
예제 #5
0
 public static async Task ErrorOnImportOrRefresh()
 {
     await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal,
                                                                                                 async() =>
     {
         var md = new MessageDialog(
             "Error while looking for files, something went wrong.",
             "Error!!!");
         md.Commands.Add(new UICommand("Close"));
         var result = await md.ShowAsync();
         if (result != null && result.Label.ToLower().Equals("close"))
         {
             SheetUtility.CloseImportRefreshPage();
         }
     });
 }
예제 #6
0
 public static async Task RefreshMusicus()
 {
     await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal,
                                                                                                 async() =>
     {
         var md = new MessageDialog(
             "Error while booting, something went wrong.",
             "Error!!!");
         md.Commands.Add(new UICommand("Repair"));
         md.Commands.Add(new UICommand("Cancel"));
         var result = await md.ShowAsync();
         if (result != null && result.Label.ToLower().Equals("repair"))
         {
             SheetUtility.OpenImportRefreshPage(2);
         }
     });
 }
예제 #7
0
 private void LastEditMetadataExecute(IF.Lastfm.Core.Objects.LastTrack obj)
 {
     SheetUtility.OpenEditTrackMetadataPage(obj as IF.Lastfm.Core.Objects.LastTrack);
 }