Exemplo n.º 1
0
        public void TestPlayArtistMixGoesAheadWhenItCan()
        {
            PlayMixTask task2 = new PlayMixTask() { ArtistName = TestArtistName };
            task2.Show();

            Assert.Pass();
        }
Exemplo n.º 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();
 }
Exemplo n.º 3
0
 private void PlayArtistTask(object sender, RoutedEventArgs e)
 {
     PlayMixTask task = new PlayMixTask();
     task.ArtistName = "Coldplay";
     task.Show();
 }
Exemplo n.º 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();
 }
Exemplo n.º 5
0
 public void TestPlayMixGoesAheadWhenItCan()
 {
     PlayMixTask task = new PlayMixTask() { MixId = TestMixId };
     task.Show();
     Assert.Pass();
 }
Exemplo n.º 6
0
 public void TestMixIdPropertyPersists()
 {
     PlayMixTask task = new PlayMixTask() { MixId = TestMixId };
     Assert.AreEqual(TestMixId, task.MixId, "Expected the same ID");
 }
Exemplo n.º 7
0
 public void TestMixIdPropertyIsRequiredForShow()
 {
     PlayMixTask task = new PlayMixTask();
     task.Show();
 }
Exemplo n.º 8
0
 public void TestArtistNamePropertyPersists()
 {
     PlayMixTask task = new PlayMixTask() { ArtistName = TestArtistName };
     Assert.AreEqual(TestArtistName, task.ArtistName, "Expected the same name");
 }
Exemplo n.º 9
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;
        }