void SetVisualState(UIButton button, UILabel title, UILabel description, SKProduct product) { button.Enabled = true; button.SetTitle(string.Format("Buy {0}", product.LocalizedPrice()), UIControlState.Normal); title.Text = product.LocalizedTitle; description.Text = product.LocalizedDescription; }
void Print(SKProduct product) { Console.WriteLine("Product id: {0}", product.ProductIdentifier); Console.WriteLine("Product title: {0}", product.LocalizedTitle); Console.WriteLine("Product description: {0}", product.LocalizedDescription); Console.WriteLine("Product price: {0}", product.Price); Console.WriteLine("Product l10n price: {0}", product.LocalizedPrice()); }
void Print(SKProduct product) { Console.WriteLine("Product id: {0}", product.ProductIdentifier); Console.WriteLine("Product title: {0}", product.LocalizedTitle); Console.WriteLine("Product description: {0}", product.LocalizedDescription); Console.WriteLine("Product price: {0}", product.Price); Console.WriteLine("Product l10n price: {0}", product.LocalizedPrice()); Console.WriteLine("Product downloadable: {0}", product.Downloadable); // iOS6 Console.WriteLine("Product version: {0}", product.DownloadContentVersion); // iOS6 if (product.DownloadContentLengths != null) { Console.WriteLine("Product length: {0}", product.DownloadContentLengths[0]); // iOS6 } }
void SetVisualState(UIButton buyBtn, UILabel title, UILabel description, SKProduct product) { buyBtn.Enabled = true; buyBtn.SetTitle(String.Format (Buy, product.LocalizedPrice()), UIControlState.Normal); title.Text = product.LocalizedTitle; description.Text = product.LocalizedDescription; }
void Print(SKProduct product) { Console.WriteLine("Product id: {0}", product.ProductIdentifier); Console.WriteLine("Product title: {0}", product.LocalizedTitle); Console.WriteLine("Product description: {0}", product.LocalizedDescription); Console.WriteLine("Product price: {0}", product.Price); Console.WriteLine("Product l10n price: {0}", product.LocalizedPrice()); Console.WriteLine("Product downloadable: {0}", product.Downloadable); // iOS6 Console.WriteLine("Product version: {0}", product.DownloadContentVersion); // iOS6 if (product.DownloadContentLengths != null) Console.WriteLine("Product length: {0}", product.DownloadContentLengths[0]); // iOS6 }
void SetVisualState(UIButton button, UILabel title, UILabel description, SKProduct product) { var btnTitle = string.Format ("Buy {0}", product.LocalizedPrice ()); button.Enabled = true; button.SetTitle (btnTitle, UIControlState.Normal); title.Text = product.LocalizedTitle; description.Text = product.LocalizedDescription; }