public void TestPlayArtistMixGoesAheadWhenItCan()
        {
            PlayMixTask task2 = new PlayMixTask() { ArtistName = TestArtistName };
            task2.Show();

            Assert.Pass();
        }
Exemple #2
0
 /// <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();
 }
Exemple #4
0
 /// <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 TestMixIdPropertyIsRequiredForShow()
 {
     PlayMixTask task = new PlayMixTask();
     task.Show();
 }
Exemple #7
0
        /// <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;
        }