private void PlayQueueButton_Click(object sender, RoutedEventArgs e) { MenuItem menuItem = (MenuItem)sender; DACPElement item = menuItem.DataContext as DACPElement; if (item == null) { return; } PlayQueueMode mode; switch (menuItem.Name) { case "PlayNextButton": mode = PlayQueueMode.PlayNext; break; case "AddToUpNextButton": mode = PlayQueueMode.AddToQueue; break; default: return; } if (item is Album) { RemoteUtility.HandleLibraryQueueTask(((Album)item).Play(mode)); return; } if (item is Song) { RemoteUtility.HandleLibraryQueueTask(CurrentGroup.PlaySong((Song)item, mode)); return; } }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is Artist) { if (isPlayButton) { RemoteUtility.HandleLibraryPlayTask(((Artist)item).Play()); } else { NavigationManager.OpenArtistPage((Artist)item); } return; } if (item is Album) { if (isPlayButton) { RemoteUtility.HandleLibraryPlayTask(((Album)item).Play()); } else { NavigationManager.OpenAlbumPage((Album)item); } return; } if (item is DACPItem) { RemoteUtility.HandleLibraryPlayTask(CurrentGenre.PlayItem((DACPItem)item)); return; } }
protected virtual void OnListItemTap(DACPElement item, LongListSelector list, bool isPlayButton) { if (item is DACPItem) { RemoteUtility.HandleLibraryPlayTask(((DACPItem)item).Play()); } }
private void PlayQueueButton_Click(object sender, RoutedEventArgs e) { var composer = CurrentComposer; if (composer == null) { return; } MenuItem menuItem = (MenuItem)sender; DACPElement item = menuItem.DataContext as DACPElement; if (item == null) { return; } PlayQueueMode mode; switch (menuItem.Name) { case "PlayNextButton": mode = PlayQueueMode.PlayNext; break; case "AddToUpNextButton": mode = PlayQueueMode.AddToQueue; break; default: return; } if (item is DACPItem) { RemoteUtility.HandleLibraryQueueTask(composer.PlayItem((DACPItem)item, mode)); return; } }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is iTunesUCourse) { NavigationManager.OpeniTunesUCourseEpisodesPage((iTunesUCourse)item); return; } }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is Song) { RemoteUtility.HandleLibraryPlayTask(CurrentGroup.PlaySong((Song)item)); return; } }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is TVShow) { TVShow tvShow = (TVShow)item; NavigationManager.OpenTVShowEpisodesPage(tvShow); return; } }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is Podcast) { Podcast podcast = (Podcast)item; NavigationManager.OpenPodcastEpisodesPage(podcast); return; } }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is DACPGenre) { NavigationManager.OpenMovieGenrePage((DACPGenre)item); return; } base.OnListItemTap(item, list, isPlayButton); }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is Playlist) { NavigationManager.OpenInternetRadioStationsPage((Playlist)item); return; } base.OnListItemTap(item, list, isPlayButton); }
protected override async void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is DACPItem) { SetProgressIndicator(null, true); await RemoteUtility.HandleLibraryPlayTaskAsync(((DACPItem)item).Play()); ClearProgressIndicator(); } }
protected override void OnListItemTap(DACPElement item, Common.Phone.Controls.LongListSelector list, bool isPlayButton) { if (item is Playlist) { NavigationManager.OpenPlaylistPage((Playlist)item); return; } if (item is DACPItem) { RemoteUtility.HandleLibraryPlayTask(CurrentContainer.PlayItem((DACPItem)item)); } }