예제 #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);
        }
예제 #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;
			}
예제 #3
0
파일: Order.cs 프로젝트: kwokhou/ceylon
 public void Add(Product product)
 {
     products.Insert (0,(Product)product.Clone());
     var evt = ProductsChanged;
     if (evt != null)
         evt (this, EventArgs.Empty);
 }
예제 #4
0
		public ProductDetailsFragment (Product product,int slidingDelta )
		{
			this.slidingDelta = slidingDelta;
			currentProduct = product;
			images = product.ImageUrls.ToArray().Shuffle() ?? new string[0];
		}
예제 #5
0
파일: Order.cs 프로젝트: kwokhou/ceylon
 public bool Remove(Product product)
 {
     var result = products.Remove (product);
     if (result) {
         var evt = ProductsChanged;
         if (evt != null)
             evt (this, EventArgs.Empty);
     }
     return result;
 }