public void TestPlayArtistMixGoesAheadWhenItCan() { PlayMixTask task2 = new PlayMixTask() { ArtistName = TestArtistName }; task2.Show(); Assert.Pass(); }
/// <summary> /// Launches Nokia Music App to play a selected mix. /// </summary> /// <param name="id">Id of the mix.</param> public void LaunchMix(string id) { if (!initialized) { return; } PlayMixTask task = new PlayMixTask(); task.MixId = id; task.Show(); }
/// <summary> /// Launches Nokia Music App to play a mix for a selected artist. /// </summary> /// <param name="artistName">Name of the artist.</param> public void LaunchArtistMix(string artistName) { if (!initialized) { return; } PlayMixTask task = new PlayMixTask(); task.ArtistName = artistName; task.Show(); }
/// <summary> /// Launches play mix task. /// </summary> /// <param name="sender">Play Mix Task button</param> /// <param name="e">Event arguments</param> private void PlayMixTask(object sender, RoutedEventArgs e) { PlayMixTask task = new PlayMixTask(); task.ArtistName = "Coldplay"; task.Show(); }
private void searchMix(object sender, RoutedEventArgs e) { PlayMixTask task = new PlayMixTask(); task.ArtistName = MixTextBox.Text; task.Show(); }
/// <summary> /// Launches Nokia Music to start playback of the mix using the PlayMixTask /// </summary> public void Play() { PlayMixTask task = new PlayMixTask() { MixId = this.Id }; task.Show(); }
/// <summary> /// Launches Nokia Music to start a mix for the artist using the PlayMixTask /// </summary> public void PlayMix() { PlayMixTask task = new PlayMixTask() { ArtistName = this.Name }; task.Show(); }
/// <summary> /// Routes clicks on an MusicItem to the right place... /// </summary> /// <param name="item">The item.</param> /// <returns>A boolean indicating if we rooted the object successfully</returns> public bool RouteItemClick(object item) { Artist artist = item as Artist; if (artist != null) { string thumb = string.Empty; if (artist.Thumb200Uri != null) { thumb = HttpUtility.UrlEncode(artist.Thumb200Uri.ToString()); } this.RootFrame.Navigate(new Uri("/ArtistPage.xaml?" + App.IdParam + "=" + artist.Id + "&" + App.NameParam + "=" + HttpUtility.UrlEncode(artist.Name) + "&" + App.ThumbParam + "=" + thumb, UriKind.Relative)); return true; } Product product = item as Product; if (product != null) { if (product.Category == Category.Track) { ShowProductTask task = new ShowProductTask() { ProductId = product.Id }; task.Show(); } else { string thumb = string.Empty; if (product.Thumb200Uri != null) { thumb = HttpUtility.UrlEncode(product.Thumb200Uri.ToString()); } this.RootFrame.Navigate(new Uri("/AlbumPage.xaml?" + App.IdParam + "=" + product.Id + "&" + App.NameParam + "=" + HttpUtility.UrlEncode(product.Name) + "&" + App.ThumbParam + "=" + thumb, UriKind.Relative)); } return true; } Genre genre = item as Genre; if (genre != null) { this.RootFrame.Navigate(new Uri("/GenrePage.xaml?" + IdParam + "=" + genre.Id + "&" + App.NameParam + "=" + HttpUtility.UrlEncode(genre.Name), UriKind.Relative)); return true; } MixGroup group = item as MixGroup; if (group != null) { this.RootFrame.Navigate(new Uri("/ShowListPage.xaml?" + ShowListPage.MethodParam + "=" + MethodCall.GetMixes + "&" + IdParam + "=" + group.Id + "&" + NameParam + "=" + HttpUtility.UrlEncode(group.Name), UriKind.Relative)); return true; } Mix mix = item as Mix; if (mix != null) { PlayMixTask mixPlayer = new PlayMixTask() { MixId = mix.Id }; mixPlayer.Show(); return true; } return false; }
public void TestPlayMixGoesAheadWhenItCan() { PlayMixTask task = new PlayMixTask() { MixId = TestMixId }; task.Show(); Assert.Pass(); }
public void TestMixIdPropertyIsRequiredForShow() { PlayMixTask task = new PlayMixTask(); task.Show(); }
/// <summary> /// Launches play artist mix task. /// </summary> /// <param name="artist">The artist name</param> static public void PlayArtistMix(string artist) { var task = new PlayMixTask { ArtistName = artist }; task.Show(); }