public void TestPlayArtistMixGoesAheadWhenItCan() { PlayMixTask task2 = new PlayMixTask() { ArtistName = TestArtistName }; task2.Show(); Assert.Pass(); }
/// <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(); }
private void PlayArtistTask(object sender, RoutedEventArgs e) { PlayMixTask task = new PlayMixTask(); task.ArtistName = "Coldplay"; 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(); }
public void TestPlayMixGoesAheadWhenItCan() { PlayMixTask task = new PlayMixTask() { MixId = TestMixId }; task.Show(); Assert.Pass(); }
public void TestMixIdPropertyPersists() { PlayMixTask task = new PlayMixTask() { MixId = TestMixId }; Assert.AreEqual(TestMixId, task.MixId, "Expected the same ID"); }
public void TestMixIdPropertyIsRequiredForShow() { PlayMixTask task = new PlayMixTask(); task.Show(); }
public void TestArtistNamePropertyPersists() { PlayMixTask task = new PlayMixTask() { ArtistName = TestArtistName }; Assert.AreEqual(TestArtistName, task.ArtistName, "Expected the same name"); }
/// <summary> /// Roots 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 RootItemClick(object item) { Artist artist = item as Artist; if (artist != null) { string thumb = string.Empty; if (artist.Thumb100Uri != null) { thumb = HttpUtility.UrlEncode(artist.Thumb100Uri.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) { ShowProductTask task = new ShowProductTask() { ProductId = product.Id }; task.Show(); return true; } Genre genre = item as Genre; if (genre != null) { this.RootFrame.Navigate(new Uri("/ShowListPage.xaml?" + ShowListPage.MethodParam + "=" + ShowListPage.MethodCall.GetTopArtistsForGenre + "&" + IdParam + "=" + genre.Id, UriKind.Relative)); return true; } MixGroup group = item as MixGroup; if (group != null) { this.RootFrame.Navigate(new Uri("/ShowListPage.xaml?" + ShowListPage.MethodParam + "=" + ShowListPage.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; }