Exemplo n.º 1
0
		void BuyProduct (Product product)
		{
			if (product == null) {
				return;
			}

			_serviceConnection.BillingHandler.BuyProduct (product);
		}
Exemplo n.º 2
0
 public ErshProduct(Product product)
 {
     ProductId = product.ProductId;
     Type = product.ProductId.Split('_')[1];
     int count;
     Sale = int.TryParse(product.ProductId.Split('_')[0], out count) ? GetSaleForProduct(count, Type) : 0;
     int price;
     Price = int.TryParse(product.Price_Amount_Micros, out price)
         ? price / 1000000 + " " + product.Price_Currency_Code
         : product.Price;
 }
Exemplo n.º 3
0
		async void connected ()
		{
			var products = await _serviceConnection.BillingHandler.QueryInventoryAsync (new List<string> { "donate" }, ItemType.Product);

			if (products != null && products.Count > 0) {
				_serviceConnection.BillingHandler.OnProductPurchaseCompleted += BillingHandler_OnProductPurchaseCompleted;

				_donateButton.Visibility = ViewStates.Visible;
				_selectedProduct = products [0];
			}
		}
Exemplo n.º 4
0
		/// <summary>
		/// Handle the user selecting an item from the list of available products
		/// </summary>
		/// <param name="parent">Parent.</param>
		/// <param name="view">View.</param>
		/// <param name="position">Position.</param>
		/// <param name="id">Identifier.</param>
		public void OnItemSelected (AdapterView parent, Android.Views.View view, int position, long id)
		{
			// Grab the selecting product
			_selectedProduct = _products [position];
		}