public void TestShowProductGoesAheadWhenItCan() { ShowProductTask task = new ShowProductTask() { AppId = TestAppId, ProductId = TestProductId }; task.Show(); Assert.Pass(); }
public void TestProductIdPropertyIsRequiredForShow() { ShowProductTask task = new ShowProductTask(); task.Show(); }
/// <summary> /// Launches Nokia Music to show details about the product using the ShowProductTask /// </summary> public void Show() { ShowProductTask task = new ShowProductTask() { ProductId = this.Id }; task.Show(); }
/// <summary> /// Launches Nokia Music app to an album view. /// </summary> /// <param name="sender">"Show in Nokia Music" button</param> /// <param name="e">Event arguments</param> private void ShowProduct(object sender, RoutedEventArgs e) { ShowProductTask task = new ShowProductTask(); task.ProductId = this._albumId; task.Show(); }
/// <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; }