Beispiel #1
0
        public void ShowProductDetail(Product product, int itemVerticalOffset)
        {
            var productDetails = new ProductDetailsFragment (product, itemVerticalOffset);

            productDetails.AddToBasket += p => {
                WebService.Shared.CurrentOrder.Add (p);

                SetupActionBar ();
            };

            SwitchScreens (productDetails);
        }
Beispiel #2
0
			async void LoadProductImage (View mainView, ProgressBar progressView, ImageView imageView, Product product)
			{
				var currentId = mainView.Id;
				progressView.Visibility = ViewStates.Visible;
				imageView.SetImageResource (Android.Resource.Color.Transparent);
				await Images.SetImageFromUrlAsync (imageView,product.ImageForSize (Images.ScreenWidth));
				progressView.Visibility = ViewStates.Invisible;
			}
Beispiel #3
0
 public void Add(Product product)
 {
     products.Insert (0,(Product)product.Clone());
     var evt = ProductsChanged;
     if (evt != null)
         evt (this, EventArgs.Empty);
 }
		public ProductDetailsFragment (Product product,int slidingDelta )
		{
			this.slidingDelta = slidingDelta;
			currentProduct = product;
			images = product.ImageUrls.ToArray().Shuffle() ?? new string[0];
		}
Beispiel #5
0
 public bool Remove(Product product)
 {
     var result = products.Remove (product);
     if (result) {
         var evt = ProductsChanged;
         if (evt != null)
             evt (this, EventArgs.Empty);
     }
     return result;
 }