Integrated Basket API service
This commit is contained in:
parent
78f1152476
commit
872ee450ad
@ -2,7 +2,7 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="eShopOnContainers.Core.Controls.CartButton">
|
x:Class="eShopOnContainers.Core.Controls.AddBasketButton">
|
||||||
<ContentView.Resources>
|
<ContentView.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
|
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace eShopOnContainers.Core.Controls
|
namespace eShopOnContainers.Core.Controls
|
||||||
{
|
{
|
||||||
public partial class CartButton : ContentView
|
public partial class AddBasketButton : ContentView
|
||||||
{
|
{
|
||||||
public CartButton()
|
public AddBasketButton()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
@ -5,5 +5,7 @@
|
|||||||
public const string RegisterWebsite = "http://104.40.62.65/Account/Register";
|
public const string RegisterWebsite = "http://104.40.62.65/Account/Register";
|
||||||
|
|
||||||
public const string CatalogEndpoint = "http://104.40.62.65:5101/";
|
public const string CatalogEndpoint = "http://104.40.62.65:5101/";
|
||||||
|
|
||||||
|
public const string BasketEndpoint = "http://104.40.62.65:5103/";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
using eShopOnContainers.Core.Helpers;
|
||||||
|
using eShopOnContainers.ViewModels.Base;
|
||||||
|
using System;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.Models.Basket
|
||||||
|
{
|
||||||
|
public class BasketItem : ExtendedBindableObject
|
||||||
|
{
|
||||||
|
private string _id;
|
||||||
|
private string _productId;
|
||||||
|
private string _productName;
|
||||||
|
private decimal _unitPrice;
|
||||||
|
private int _quantity;
|
||||||
|
private string _pictureUrl;
|
||||||
|
private ObservableCollection<int> _numbers;
|
||||||
|
|
||||||
|
public BasketItem()
|
||||||
|
{
|
||||||
|
Numbers = NumericHelper.GetNumericList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Id
|
||||||
|
{
|
||||||
|
get { return _id; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_id = value;
|
||||||
|
RaisePropertyChanged(() => Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ProductId
|
||||||
|
{
|
||||||
|
get { return _productId; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_productId = value;
|
||||||
|
RaisePropertyChanged(() => ProductId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ProductName
|
||||||
|
{
|
||||||
|
get { return _productName; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_productName = value;
|
||||||
|
RaisePropertyChanged(() => ProductName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public decimal UnitPrice
|
||||||
|
{
|
||||||
|
get { return _unitPrice; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_unitPrice = value;
|
||||||
|
RaisePropertyChanged(() => UnitPrice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Quantity
|
||||||
|
{
|
||||||
|
get { return _quantity; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_quantity = value;
|
||||||
|
RaisePropertyChanged(() => Quantity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string PictureUrl
|
||||||
|
{
|
||||||
|
get { return _pictureUrl; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_pictureUrl = value;
|
||||||
|
RaisePropertyChanged(() => PictureUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public decimal Total { get { return Quantity * UnitPrice; } }
|
||||||
|
|
||||||
|
public ObservableCollection<int> Numbers
|
||||||
|
{
|
||||||
|
get { return _numbers; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_numbers = value;
|
||||||
|
RaisePropertyChanged(() => Numbers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return String.Format("Product Id: {0}, Quantity: {1}", ProductId, Quantity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.Models.Basket
|
||||||
|
{
|
||||||
|
public class CustomerBasket
|
||||||
|
{
|
||||||
|
public string BuyerId { get; set; }
|
||||||
|
public List<BasketItem> Items { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -10,7 +10,7 @@ namespace eShopOnContainers.Core.Models.Orders
|
|||||||
public class OrderItem : ExtendedBindableObject
|
public class OrderItem : ExtendedBindableObject
|
||||||
{
|
{
|
||||||
private string _productImage;
|
private string _productImage;
|
||||||
private int _productId;
|
private string _productId;
|
||||||
private Guid _orderId;
|
private Guid _orderId;
|
||||||
private string _productName;
|
private string _productName;
|
||||||
private decimal _unitPrice;
|
private decimal _unitPrice;
|
||||||
@ -23,7 +23,7 @@ namespace eShopOnContainers.Core.Models.Orders
|
|||||||
Numbers = NumericHelper.GetNumericList();
|
Numbers = NumericHelper.GetNumericList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ProductId
|
public string ProductId
|
||||||
{
|
{
|
||||||
get { return _productId; }
|
get { return _productId; }
|
||||||
set
|
set
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
namespace eShopOnContainers.Core.Models.User
|
using System;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.Models.User
|
||||||
{
|
{
|
||||||
public class User
|
public class User
|
||||||
{
|
{
|
||||||
|
public string GuidUser { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string LastName { get; set; }
|
public string LastName { get; set; }
|
||||||
public string CardNumber { get; set; }
|
public string CardNumber { get; set; }
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
using eShopOnContainers.Core.Models.Basket;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xamarin.Forms;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.Services.Basket
|
||||||
|
{
|
||||||
|
public class BasketMockService : IBasketService
|
||||||
|
{
|
||||||
|
private CustomerBasket MockCustomBasket = new CustomerBasket
|
||||||
|
{
|
||||||
|
BuyerId = "9245fe4a-d402-451c-b9ed-9c1a04247482",
|
||||||
|
Items = new List<BasketItem>
|
||||||
|
{
|
||||||
|
new BasketItem { Id = "1", PictureUrl = Device.OS != TargetPlatform.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png", ProductId = "1", ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 19.50M },
|
||||||
|
new BasketItem { Id = "2", PictureUrl = Device.OS != TargetPlatform.Windows ? "fake_product_04.png" : "Assets/fake_product_04.png", ProductId = "4", ProductName = ".NET Black Cupt", Quantity = 1, UnitPrice = 17.00M }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public async Task<CustomerBasket> GetBasketAsync(string guidUser)
|
||||||
|
{
|
||||||
|
await Task.Delay(500);
|
||||||
|
|
||||||
|
if(string.IsNullOrEmpty(guidUser))
|
||||||
|
{
|
||||||
|
return new CustomerBasket();
|
||||||
|
}
|
||||||
|
|
||||||
|
return MockCustomBasket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket)
|
||||||
|
{
|
||||||
|
await Task.Delay(500);
|
||||||
|
|
||||||
|
MockCustomBasket = customerBasket;
|
||||||
|
|
||||||
|
return MockCustomBasket;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using eShopOnContainers.Core.Services.RequestProvider;
|
||||||
|
using eShopOnContainers.Core.Models.Basket;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.Services.Basket
|
||||||
|
{
|
||||||
|
public class BasketService : IBasketService
|
||||||
|
{
|
||||||
|
private readonly IRequestProvider _requestProvider;
|
||||||
|
|
||||||
|
public BasketService(IRequestProvider requestProvider)
|
||||||
|
{
|
||||||
|
_requestProvider = requestProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<CustomerBasket> GetBasketAsync(string guidUser)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
UriBuilder builder = new UriBuilder(GlobalSetting.CatalogEndpoint);
|
||||||
|
|
||||||
|
builder.Path = guidUser;
|
||||||
|
|
||||||
|
string uri = builder.ToString();
|
||||||
|
|
||||||
|
CustomerBasket basket =
|
||||||
|
await _requestProvider.GetAsync<CustomerBasket>(uri);
|
||||||
|
|
||||||
|
return basket;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return new CustomerBasket
|
||||||
|
{
|
||||||
|
BuyerId = guidUser,
|
||||||
|
Items = new System.Collections.Generic.List<BasketItem>()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket)
|
||||||
|
{
|
||||||
|
UriBuilder builder = new UriBuilder(GlobalSetting.CatalogEndpoint);
|
||||||
|
|
||||||
|
string uri = builder.ToString();
|
||||||
|
|
||||||
|
var result = await _requestProvider.PostAsync(uri, customerBasket);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
using eShopOnContainers.Core.Models.Basket;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.Services.Basket
|
||||||
|
{
|
||||||
|
public interface IBasketService
|
||||||
|
{
|
||||||
|
Task<CustomerBasket> GetBasketAsync(string guidUser);
|
||||||
|
Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket);
|
||||||
|
}
|
||||||
|
}
|
@ -147,7 +147,7 @@ namespace eShopOnContainers.Services
|
|||||||
|
|
||||||
private void CreatePageViewModelMappings()
|
private void CreatePageViewModelMappings()
|
||||||
{
|
{
|
||||||
_mappings.Add(typeof(CartViewModel), typeof(CartView));
|
_mappings.Add(typeof(BasketViewModel), typeof(BasketView));
|
||||||
_mappings.Add(typeof(CatalogViewModel), typeof(CatalogView));
|
_mappings.Add(typeof(CatalogViewModel), typeof(CatalogView));
|
||||||
_mappings.Add(typeof(CheckoutViewModel), typeof(CheckoutView));
|
_mappings.Add(typeof(CheckoutViewModel), typeof(CheckoutView));
|
||||||
_mappings.Add(typeof(LoginViewModel), typeof(LoginView));
|
_mappings.Add(typeof(LoginViewModel), typeof(LoginView));
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
using eShopOnContainers.Core.Models.Orders;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.Services.Orders
|
|
||||||
{
|
|
||||||
public interface IOrdersService
|
|
||||||
{
|
|
||||||
Task<ObservableCollection<Order>> GetOrdersAsync();
|
|
||||||
|
|
||||||
Task<Order> GetCartAsync();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
using eShopOnContainers.Core.Models.Orders;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.Services.Orders
|
|
||||||
{
|
|
||||||
public class OrdersMockService : IOrdersService
|
|
||||||
{
|
|
||||||
public async Task<ObservableCollection<Order>> GetOrdersAsync()
|
|
||||||
{
|
|
||||||
await Task.Delay(500);
|
|
||||||
|
|
||||||
return new ObservableCollection<Order>
|
|
||||||
{
|
|
||||||
new Order { SequenceNumber = 123, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = GetOrderItems() },
|
|
||||||
new Order { SequenceNumber = 132, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = GetOrderItems() },
|
|
||||||
new Order { SequenceNumber = 231, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = GetOrderItems() },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Order> GetCartAsync()
|
|
||||||
{
|
|
||||||
await Task.Delay(500);
|
|
||||||
|
|
||||||
return new Order { SequenceNumber = 0123456789, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Pending, OrderItems = GetOrderItems() };
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<OrderItem> GetOrderItems()
|
|
||||||
{
|
|
||||||
return new List<OrderItem>
|
|
||||||
{
|
|
||||||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = 1, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M },
|
|
||||||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = 3, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -34,6 +34,7 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
|||||||
await HandleResponse(response);
|
await HandleResponse(response);
|
||||||
|
|
||||||
string serialized = await response.Content.ReadAsStringAsync();
|
string serialized = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
TResult result = await Task.Run(() =>
|
TResult result = await Task.Run(() =>
|
||||||
JsonConvert.DeserializeObject<TResult>(serialized, _serializerSettings));
|
JsonConvert.DeserializeObject<TResult>(serialized, _serializerSettings));
|
||||||
|
|
||||||
@ -91,7 +92,8 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
|||||||
{
|
{
|
||||||
var content = await response.Content.ReadAsStringAsync();
|
var content = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
if (response.StatusCode == HttpStatusCode.Forbidden || response.StatusCode == HttpStatusCode.Unauthorized)
|
if (response.StatusCode == HttpStatusCode.Forbidden
|
||||||
|
|| response.StatusCode == HttpStatusCode.Unauthorized)
|
||||||
{
|
{
|
||||||
throw new ServiceAuthenticationException(content);
|
throw new ServiceAuthenticationException(content);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
using System.Threading.Tasks;
|
using eShopOnContainers.Core.Models.Orders;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.Services.User
|
namespace eShopOnContainers.Core.Services.User
|
||||||
{
|
{
|
||||||
public interface IUserService
|
public interface IUserService
|
||||||
{
|
{
|
||||||
Task<Models.User.User> GetUserAsync();
|
Task<Models.User.User> GetUserAsync();
|
||||||
|
Task<List<Order>> GetOrdersAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,7 @@
|
|||||||
using System.Threading.Tasks;
|
using eShopOnContainers.Core.Models.Orders;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.Services.User
|
namespace eShopOnContainers.Core.Services.User
|
||||||
{
|
{
|
||||||
@ -6,6 +9,7 @@ namespace eShopOnContainers.Core.Services.User
|
|||||||
{
|
{
|
||||||
private Models.User.User MockUser = new Models.User.User
|
private Models.User.User MockUser = new Models.User.User
|
||||||
{
|
{
|
||||||
|
GuidUser = "9245fe4a-d402-451c-b9ed-9c1a04247482",
|
||||||
Name = "Jhon",
|
Name = "Jhon",
|
||||||
LastName = "Doe",
|
LastName = "Doe",
|
||||||
City = "Seattle, WA",
|
City = "Seattle, WA",
|
||||||
@ -14,11 +18,31 @@ namespace eShopOnContainers.Core.Services.User
|
|||||||
Country = "United States"
|
Country = "United States"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private List<Order> MockOrders = new List<Order>()
|
||||||
|
{
|
||||||
|
new Order { SequenceNumber = 123, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = MockOrderItems },
|
||||||
|
new Order { SequenceNumber = 132, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = MockOrderItems },
|
||||||
|
new Order { SequenceNumber = 231, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = MockOrderItems },
|
||||||
|
};
|
||||||
|
|
||||||
|
private static List<OrderItem> MockOrderItems = new List<OrderItem>()
|
||||||
|
{
|
||||||
|
new OrderItem { OrderId = Guid.NewGuid(), ProductId = "1", Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M },
|
||||||
|
new OrderItem { OrderId = Guid.NewGuid(), ProductId = "3", Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M }
|
||||||
|
};
|
||||||
|
|
||||||
public async Task<Models.User.User> GetUserAsync()
|
public async Task<Models.User.User> GetUserAsync()
|
||||||
{
|
{
|
||||||
await Task.Delay(500);
|
await Task.Delay(500);
|
||||||
|
|
||||||
return MockUser;
|
return MockUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<Order>> GetOrdersAsync()
|
||||||
|
{
|
||||||
|
await Task.Delay(500);
|
||||||
|
|
||||||
|
return MockOrders;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,10 +2,13 @@
|
|||||||
{
|
{
|
||||||
public class MessengerKeys
|
public class MessengerKeys
|
||||||
{
|
{
|
||||||
// Add product to cart
|
// Add product to basket
|
||||||
public const string AddProduct = "AddProduct";
|
public const string AddProduct = "AddProduct";
|
||||||
|
|
||||||
// Update product cart
|
// Update Basket
|
||||||
|
public const string UpdateBasket = "UpdateBasket";
|
||||||
|
|
||||||
|
// Update product basket
|
||||||
public const string UpdateProduct = "UpdateProduct";
|
public const string UpdateProduct = "UpdateProduct";
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Microsoft.Practices.Unity;
|
using Microsoft.Practices.Unity;
|
||||||
using eShopOnContainers.Core.Services.Orders;
|
|
||||||
using eShopOnContainers.Core.ViewModels;
|
using eShopOnContainers.Core.ViewModels;
|
||||||
using eShopOnContainers.Services;
|
using eShopOnContainers.Services;
|
||||||
using System;
|
using System;
|
||||||
@ -7,6 +6,7 @@ using eShopOnContainers.Core.Services.Catalog;
|
|||||||
using eShopOnContainers.Core.Services.OpenUrl;
|
using eShopOnContainers.Core.Services.OpenUrl;
|
||||||
using eShopOnContainers.Core.Services.User;
|
using eShopOnContainers.Core.Services.User;
|
||||||
using eShopOnContainers.Core.Services.RequestProvider;
|
using eShopOnContainers.Core.Services.RequestProvider;
|
||||||
|
using eShopOnContainers.Core.Services.Basket;
|
||||||
|
|
||||||
namespace eShopOnContainers.ViewModels.Base
|
namespace eShopOnContainers.ViewModels.Base
|
||||||
{
|
{
|
||||||
@ -39,11 +39,11 @@ namespace eShopOnContainers.ViewModels.Base
|
|||||||
_unityContainer.RegisterType<IRequestProvider, RequestProvider>();
|
_unityContainer.RegisterType<IRequestProvider, RequestProvider>();
|
||||||
|
|
||||||
_unityContainer.RegisterType<ICatalogService, CatalogMockService>();
|
_unityContainer.RegisterType<ICatalogService, CatalogMockService>();
|
||||||
_unityContainer.RegisterType<IOrdersService, OrdersMockService>();
|
_unityContainer.RegisterType<IBasketService, BasketMockService>();
|
||||||
_unityContainer.RegisterType<IUserService, UserMockService>();
|
_unityContainer.RegisterType<IUserService, UserMockService>();
|
||||||
|
|
||||||
// View models
|
// View models
|
||||||
_unityContainer.RegisterType<CartViewModel>();
|
_unityContainer.RegisterType<BasketViewModel>();
|
||||||
_unityContainer.RegisterType<CatalogViewModel>();
|
_unityContainer.RegisterType<CatalogViewModel>();
|
||||||
_unityContainer.RegisterType<CheckoutViewModel>();
|
_unityContainer.RegisterType<CheckoutViewModel>();
|
||||||
_unityContainer.RegisterType<LoginViewModel>();
|
_unityContainer.RegisterType<LoginViewModel>();
|
||||||
@ -58,7 +58,7 @@ namespace eShopOnContainers.ViewModels.Base
|
|||||||
if (!useMockServices)
|
if (!useMockServices)
|
||||||
{
|
{
|
||||||
_unityContainer.RegisterInstance<ICatalogService>(new CatalogMockService());
|
_unityContainer.RegisterInstance<ICatalogService>(new CatalogMockService());
|
||||||
_unityContainer.RegisterInstance<IOrdersService>(new OrdersMockService());
|
_unityContainer.RegisterInstance<IBasketService>(new BasketMockService());
|
||||||
_unityContainer.RegisterInstance<IUserService>(new UserMockService());
|
_unityContainer.RegisterInstance<IUserService>(new UserMockService());
|
||||||
|
|
||||||
UseMockService = false;
|
UseMockService = false;
|
||||||
@ -67,6 +67,8 @@ namespace eShopOnContainers.ViewModels.Base
|
|||||||
{
|
{
|
||||||
var requestProvider = Resolve<IRequestProvider>();
|
var requestProvider = Resolve<IRequestProvider>();
|
||||||
_unityContainer.RegisterInstance<ICatalogService>(new CatalogService(requestProvider));
|
_unityContainer.RegisterInstance<ICatalogService>(new CatalogService(requestProvider));
|
||||||
|
_unityContainer.RegisterInstance<IBasketService>(new BasketService(requestProvider));
|
||||||
|
_unityContainer.RegisterInstance<IUserService>(new UserMockService());
|
||||||
|
|
||||||
UseMockService = true;
|
UseMockService = true;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,150 @@
|
|||||||
|
using eShopOnContainers.Core.Models.Basket;
|
||||||
|
using eShopOnContainers.Core.Models.Catalog;
|
||||||
|
using eShopOnContainers.Core.Models.Orders;
|
||||||
|
using eShopOnContainers.Core.Models.User;
|
||||||
|
using eShopOnContainers.Core.Services.Basket;
|
||||||
|
using eShopOnContainers.Core.Services.User;
|
||||||
|
using eShopOnContainers.Core.ViewModels.Base;
|
||||||
|
using eShopOnContainers.ViewModels.Base;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using Xamarin.Forms;
|
||||||
|
|
||||||
|
namespace eShopOnContainers.Core.ViewModels
|
||||||
|
{
|
||||||
|
public class BasketViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
private User _user;
|
||||||
|
private int _badgeCount;
|
||||||
|
private ObservableCollection<BasketItem> _basketItems;
|
||||||
|
private decimal _total;
|
||||||
|
|
||||||
|
private IUserService _userService;
|
||||||
|
private IBasketService _basketService;
|
||||||
|
|
||||||
|
public BasketViewModel(IUserService userService,
|
||||||
|
IBasketService basketService)
|
||||||
|
{
|
||||||
|
_userService = userService;
|
||||||
|
_basketService = basketService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int BadgeCount
|
||||||
|
{
|
||||||
|
get { return _badgeCount; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_badgeCount = value;
|
||||||
|
RaisePropertyChanged(() => BadgeCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableCollection<BasketItem> BasketItems
|
||||||
|
{
|
||||||
|
get { return _basketItems; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_basketItems = value;
|
||||||
|
RaisePropertyChanged(() => BasketItems);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public decimal Total
|
||||||
|
{
|
||||||
|
get { return _total; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_total = value;
|
||||||
|
RaisePropertyChanged(() => Total);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand CheckoutCommand => new Command(Checkout);
|
||||||
|
|
||||||
|
public override async Task InitializeAsync(object navigationData)
|
||||||
|
{
|
||||||
|
MessagingCenter.Subscribe<CatalogViewModel, List<BasketItem>>(this, MessengerKeys.UpdateBasket, (sender, arg) =>
|
||||||
|
{
|
||||||
|
BadgeCount = arg.Count;
|
||||||
|
|
||||||
|
foreach (var basketItem in arg)
|
||||||
|
{
|
||||||
|
AddBasketItem(basketItem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
MessagingCenter.Subscribe<CatalogViewModel, CatalogItem>(this, MessengerKeys.AddProduct, (sender, arg) =>
|
||||||
|
{
|
||||||
|
BadgeCount++;
|
||||||
|
|
||||||
|
AddCatalogItem(arg);
|
||||||
|
});
|
||||||
|
|
||||||
|
MessagingCenter.Subscribe<OrderItem>(this, MessengerKeys.UpdateProduct, (sender) =>
|
||||||
|
{
|
||||||
|
ReCalculateTotal();
|
||||||
|
});
|
||||||
|
|
||||||
|
_user = await _userService.GetUserAsync();
|
||||||
|
BasketItems = new ObservableCollection<BasketItem>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddCatalogItem(CatalogItem item)
|
||||||
|
{
|
||||||
|
if (BasketItems.Any(o => o.ProductId.Equals(item.Id, StringComparison.CurrentCultureIgnoreCase)))
|
||||||
|
{
|
||||||
|
var orderItem = BasketItems.First(o => o.ProductId.Equals(item.Id, StringComparison.CurrentCultureIgnoreCase));
|
||||||
|
orderItem.Quantity++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BasketItems.Add(new BasketItem
|
||||||
|
{
|
||||||
|
ProductId = item.Id,
|
||||||
|
ProductName = item.Name,
|
||||||
|
PictureUrl = item.PictureUri,
|
||||||
|
UnitPrice = item.Price,
|
||||||
|
Quantity = 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ReCalculateTotal();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddBasketItem(BasketItem item)
|
||||||
|
{
|
||||||
|
BasketItems.Add(item);
|
||||||
|
|
||||||
|
ReCalculateTotal();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ReCalculateTotal()
|
||||||
|
{
|
||||||
|
Total = 0;
|
||||||
|
|
||||||
|
foreach (var orderItem in BasketItems)
|
||||||
|
{
|
||||||
|
Total += (orderItem.Quantity * orderItem.UnitPrice);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_basketService.UpdateBasketAsync(new CustomerBasket
|
||||||
|
{
|
||||||
|
BuyerId = _user.GuidUser,
|
||||||
|
Items = BasketItems.ToList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Checkout()
|
||||||
|
{
|
||||||
|
if (BasketItems.Any())
|
||||||
|
{
|
||||||
|
NavigationService.NavigateToAsync<CheckoutViewModel>(BasketItems);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,117 +0,0 @@
|
|||||||
using eShopOnContainers.Core.Helpers;
|
|
||||||
using eShopOnContainers.Core.Models.Catalog;
|
|
||||||
using eShopOnContainers.Core.Models.Orders;
|
|
||||||
using eShopOnContainers.Core.Services.Orders;
|
|
||||||
using eShopOnContainers.Core.ViewModels.Base;
|
|
||||||
using eShopOnContainers.ViewModels.Base;
|
|
||||||
using System;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using Xamarin.Forms;
|
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.ViewModels
|
|
||||||
{
|
|
||||||
public class CartViewModel : ViewModelBase
|
|
||||||
{
|
|
||||||
private int _badgeCount;
|
|
||||||
private ObservableCollection<OrderItem> _orderItems;
|
|
||||||
private decimal _total;
|
|
||||||
|
|
||||||
private IOrdersService _orderService;
|
|
||||||
|
|
||||||
public CartViewModel(IOrdersService orderService)
|
|
||||||
{
|
|
||||||
_orderService = orderService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int BadgeCount
|
|
||||||
{
|
|
||||||
get { return _badgeCount; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_badgeCount = value;
|
|
||||||
RaisePropertyChanged(() => BadgeCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ObservableCollection<OrderItem> OrderItems
|
|
||||||
{
|
|
||||||
get { return _orderItems; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_orderItems = value;
|
|
||||||
RaisePropertyChanged(() => OrderItems);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public decimal Total
|
|
||||||
{
|
|
||||||
get { return _total; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_total = value;
|
|
||||||
RaisePropertyChanged(() => Total);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ICommand CheckoutCommand => new Command(Checkout);
|
|
||||||
|
|
||||||
public override Task InitializeAsync(object navigationData)
|
|
||||||
{
|
|
||||||
MessagingCenter.Subscribe<CatalogViewModel, CatalogItem>(this, MessengerKeys.AddProduct, (sender, arg) =>
|
|
||||||
{
|
|
||||||
BadgeCount++;
|
|
||||||
|
|
||||||
AddCartItem(arg);
|
|
||||||
});
|
|
||||||
|
|
||||||
MessagingCenter.Subscribe<OrderItem>(this, MessengerKeys.UpdateProduct, (sender) =>
|
|
||||||
{
|
|
||||||
ReCalculateTotal();
|
|
||||||
});
|
|
||||||
|
|
||||||
OrderItems = new ObservableCollection<OrderItem>();
|
|
||||||
|
|
||||||
return base.InitializeAsync(navigationData);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddCartItem(CatalogItem item)
|
|
||||||
{
|
|
||||||
if (OrderItems.Any(o => o.ProductId == Convert.ToInt32(item.Id)))
|
|
||||||
{
|
|
||||||
var orderItem = OrderItems.First(o => o.ProductId == Convert.ToInt32(item.Id));
|
|
||||||
orderItem.Quantity++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
OrderItems.Add(new OrderItem
|
|
||||||
{
|
|
||||||
ProductId = Convert.ToInt32(item.Id),
|
|
||||||
ProductName = item.Name,
|
|
||||||
ProductImage = item.PictureUri,
|
|
||||||
UnitPrice = item.Price,
|
|
||||||
Quantity = 1
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
ReCalculateTotal();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ReCalculateTotal()
|
|
||||||
{
|
|
||||||
Total = 0;
|
|
||||||
|
|
||||||
foreach (var orderItem in OrderItems)
|
|
||||||
{
|
|
||||||
Total += orderItem.Total;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Checkout()
|
|
||||||
{
|
|
||||||
NavigationService.NavigateToAsync<CheckoutViewModel>(OrderItems);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,6 +6,9 @@ using eShopOnContainers.Core.ViewModels.Base;
|
|||||||
using eShopOnContainers.Core.Models.Catalog;
|
using eShopOnContainers.Core.Models.Catalog;
|
||||||
using eShopOnContainers.Core.Services.Catalog;
|
using eShopOnContainers.Core.Services.Catalog;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
using eShopOnContainers.Core.Services.User;
|
||||||
|
using System.Linq;
|
||||||
|
using eShopOnContainers.Core.Services.Basket;
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.ViewModels
|
namespace eShopOnContainers.Core.ViewModels
|
||||||
{
|
{
|
||||||
@ -17,10 +20,16 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
private ObservableCollection<CatalogType> _types;
|
private ObservableCollection<CatalogType> _types;
|
||||||
private CatalogType _type;
|
private CatalogType _type;
|
||||||
|
|
||||||
|
private IUserService _userService;
|
||||||
|
private IBasketService _basketService;
|
||||||
private ICatalogService _productsService;
|
private ICatalogService _productsService;
|
||||||
|
|
||||||
public CatalogViewModel(ICatalogService productsService)
|
public CatalogViewModel(IUserService userService,
|
||||||
|
IBasketService basketService,
|
||||||
|
ICatalogService productsService)
|
||||||
{
|
{
|
||||||
|
_userService = userService;
|
||||||
|
_basketService = basketService;
|
||||||
_productsService = productsService;
|
_productsService = productsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,6 +101,15 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
Brands = await _productsService.GetCatalogBrandAsync();
|
Brands = await _productsService.GetCatalogBrandAsync();
|
||||||
Types = await _productsService.GetCatalogTypeAsync();
|
Types = await _productsService.GetCatalogTypeAsync();
|
||||||
|
|
||||||
|
var user = await _userService.GetUserAsync();
|
||||||
|
var basket = await _basketService.GetBasketAsync(user.GuidUser);
|
||||||
|
|
||||||
|
if (basket != null && basket.Items.Any())
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.WriteLine(basket.Items.Count);
|
||||||
|
MessagingCenter.Send(this, MessengerKeys.UpdateBasket, basket.Items);
|
||||||
|
}
|
||||||
|
|
||||||
IsBusy = false;
|
IsBusy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,12 +9,14 @@ using eShopOnContainers.Core.Models.Orders;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using eShopOnContainers.Core.Models.Basket;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.ViewModels
|
namespace eShopOnContainers.Core.ViewModels
|
||||||
{
|
{
|
||||||
public class CheckoutViewModel : ViewModelBase
|
public class CheckoutViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
private ObservableCollection<OrderItem> _orderItems;
|
private ObservableCollection<BasketItem> _orderItems;
|
||||||
private Order _order;
|
private Order _order;
|
||||||
private User _user;
|
private User _user;
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
_userService = userService;
|
_userService = userService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<OrderItem> OrderItems
|
public ObservableCollection<BasketItem> OrderItems
|
||||||
{
|
{
|
||||||
get { return _orderItems; }
|
get { return _orderItems; }
|
||||||
set
|
set
|
||||||
@ -59,11 +61,11 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
|
|
||||||
public override async Task InitializeAsync(object navigationData)
|
public override async Task InitializeAsync(object navigationData)
|
||||||
{
|
{
|
||||||
if (navigationData is ObservableCollection<OrderItem>)
|
if (navigationData is ObservableCollection<BasketItem>)
|
||||||
{
|
{
|
||||||
IsBusy = true;
|
IsBusy = true;
|
||||||
|
|
||||||
var orderItems = ((ObservableCollection<OrderItem>)navigationData);
|
var orderItems = ((ObservableCollection<BasketItem>)navigationData);
|
||||||
|
|
||||||
OrderItems = orderItems;
|
OrderItems = orderItems;
|
||||||
|
|
||||||
@ -72,7 +74,7 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
Order = new Order
|
Order = new Order
|
||||||
{
|
{
|
||||||
ShippingAddress = User,
|
ShippingAddress = User,
|
||||||
OrderItems = orderItems.ToList(),
|
OrderItems = CreateOrderItems(orderItems.ToList()),
|
||||||
Status = OrderStatus.Pending,
|
Status = OrderStatus.Pending,
|
||||||
OrderDate = DateTime.Now,
|
OrderDate = DateTime.Now,
|
||||||
Total = GetOrderTotal()
|
Total = GetOrderTotal()
|
||||||
@ -91,6 +93,25 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
await NavigationService.RemoveLastFromBackStackAsync();
|
await NavigationService.RemoveLastFromBackStackAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<OrderItem> CreateOrderItems(List<BasketItem> basketItems)
|
||||||
|
{
|
||||||
|
var orderItems = new List<OrderItem>();
|
||||||
|
|
||||||
|
foreach (var basketItem in basketItems)
|
||||||
|
{
|
||||||
|
orderItems.Add(new OrderItem
|
||||||
|
{
|
||||||
|
ProductId = basketItem.ProductId,
|
||||||
|
ProductName = basketItem.ProductName,
|
||||||
|
ProductImage = basketItem.PictureUrl,
|
||||||
|
Quantity = basketItem.Quantity,
|
||||||
|
UnitPrice = basketItem.UnitPrice
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return orderItems;
|
||||||
|
}
|
||||||
|
|
||||||
private decimal GetOrderTotal()
|
private decimal GetOrderTotal()
|
||||||
{
|
{
|
||||||
decimal total = 0;
|
decimal total = 0;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using eShopOnContainers.Core.Models.Orders;
|
using eShopOnContainers.Core.Models.Orders;
|
||||||
using eShopOnContainers.ViewModels.Base;
|
using eShopOnContainers.ViewModels.Base;
|
||||||
using eShopOnContainers.Core.Services.Orders;
|
|
||||||
using eShopOnContainers.Core.Services.Catalog;
|
using eShopOnContainers.Core.Services.Catalog;
|
||||||
using eShopOnContainers.Core.Services.User;
|
using eShopOnContainers.Core.Services.User;
|
||||||
using eShopOnContainers.Core.Models.User;
|
using eShopOnContainers.Core.Models.User;
|
||||||
|
using eShopOnContainers.Core.Services.Basket;
|
||||||
|
|
||||||
namespace eShopOnContainers.Core.ViewModels
|
namespace eShopOnContainers.Core.ViewModels
|
||||||
{
|
{
|
||||||
@ -13,11 +13,11 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
private Order _order;
|
private Order _order;
|
||||||
private User _user;
|
private User _user;
|
||||||
|
|
||||||
private IOrdersService _orderService;
|
private IBasketService _orderService;
|
||||||
private ICatalogService _catalogService;
|
private ICatalogService _catalogService;
|
||||||
private IUserService _userService;
|
private IUserService _userService;
|
||||||
|
|
||||||
public OrderDetailViewModel(IOrdersService orderService,
|
public OrderDetailViewModel(IBasketService orderService,
|
||||||
ICatalogService catalogService,
|
ICatalogService catalogService,
|
||||||
IUserService userService)
|
IUserService userService)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using eShopOnContainers.Core.Models.Orders;
|
using eShopOnContainers.Core.Extensions;
|
||||||
using eShopOnContainers.Core.Services.Orders;
|
using eShopOnContainers.Core.Models.Orders;
|
||||||
|
using eShopOnContainers.Core.Services.User;
|
||||||
using eShopOnContainers.ViewModels.Base;
|
using eShopOnContainers.ViewModels.Base;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -12,11 +13,11 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
{
|
{
|
||||||
private ObservableCollection<Order> _orders;
|
private ObservableCollection<Order> _orders;
|
||||||
|
|
||||||
private IOrdersService _ordersService;
|
private IUserService _userService;
|
||||||
|
|
||||||
public ProfileViewModel(IOrdersService ordersService)
|
public ProfileViewModel(IUserService userService)
|
||||||
{
|
{
|
||||||
_ordersService = ordersService;
|
_userService = userService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<Order> Orders
|
public ObservableCollection<Order> Orders
|
||||||
@ -37,7 +38,8 @@ namespace eShopOnContainers.Core.ViewModels
|
|||||||
{
|
{
|
||||||
IsBusy = true;
|
IsBusy = true;
|
||||||
|
|
||||||
Orders = await _ordersService.GetOrdersAsync();
|
var orders = await _userService.GetOrdersAsync();
|
||||||
|
Orders = orders.ToObservableCollection();
|
||||||
|
|
||||||
IsBusy = false;
|
IsBusy = false;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="eShopOnContainers.Core.Views.CartView"
|
x:Class="eShopOnContainers.Core.Views.BasketView"
|
||||||
xmlns:templates="clr-namespace:eShopOnContainers.Core.Views.Templates;assembly=eShopOnContainers.Core"
|
xmlns:templates="clr-namespace:eShopOnContainers.Core.Views.Templates;assembly=eShopOnContainers.Core"
|
||||||
Title="Cart">
|
Title="Cart">
|
||||||
<ContentPage.Resources>
|
<ContentPage.Resources>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
BackgroundColor="{StaticResource BackgroundColor}">
|
BackgroundColor="{StaticResource BackgroundColor}">
|
||||||
<!-- SHOPPING CART -->
|
<!-- SHOPPING CART -->
|
||||||
<Grid
|
<Grid
|
||||||
IsVisible="{Binding OrderItems.Count, Converter={StaticResource CountToBoolConverter}}">
|
IsVisible="{Binding BasketItems.Count, Converter={StaticResource CountToBoolConverter}}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="60" />
|
<RowDefinition Height="60" />
|
||||||
@ -73,7 +73,7 @@
|
|||||||
<!-- ITEMS -->
|
<!-- ITEMS -->
|
||||||
<ListView
|
<ListView
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
ItemsSource="{Binding OrderItems}"
|
ItemsSource="{Binding BasketItems}"
|
||||||
HasUnevenRows="True"
|
HasUnevenRows="True"
|
||||||
SeparatorVisibility="None"
|
SeparatorVisibility="None"
|
||||||
VerticalOptions="FillAndExpand"
|
VerticalOptions="FillAndExpand"
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ViewCell>
|
<ViewCell>
|
||||||
<templates:CartOrderItemTemplate />
|
<templates:BasketItemTemplate />
|
||||||
</ViewCell>
|
</ViewCell>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
@ -122,7 +122,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<!-- EMPTY SHOPPING CART -->
|
<!-- EMPTY SHOPPING CART -->
|
||||||
<Grid
|
<Grid
|
||||||
IsVisible="{Binding OrderItems.Count, Converter={StaticResource InverseCountToBoolConverter}}">
|
IsVisible="{Binding BasketItems.Count, Converter={StaticResource InverseCountToBoolConverter}}">
|
||||||
<Label
|
<Label
|
||||||
Text="EMPTY SHOPPING CART"
|
Text="EMPTY SHOPPING CART"
|
||||||
HorizontalOptions="Center"
|
HorizontalOptions="Center"
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace eShopOnContainers.Core.Views
|
namespace eShopOnContainers.Core.Views
|
||||||
{
|
{
|
||||||
public partial class CartView : ContentPage
|
public partial class BasketView : ContentPage
|
||||||
{
|
{
|
||||||
public CartView()
|
public BasketView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
@ -41,16 +41,16 @@
|
|||||||
WinPhone="Assets\menu_profile.png"/>
|
WinPhone="Assets\menu_profile.png"/>
|
||||||
</views:ProfileView.Icon>
|
</views:ProfileView.Icon>
|
||||||
</views:ProfileView>
|
</views:ProfileView>
|
||||||
<views:CartView
|
<views:BasketView
|
||||||
x:Name="CartView"
|
x:Name="BasketView"
|
||||||
controls:CustomTabbedPage.BadgeText="{Binding BadgeCount}"
|
controls:CustomTabbedPage.BadgeText="{Binding BadgeCount}"
|
||||||
controls:CustomTabbedPage.BadgeColor="{StaticResource LightGreenColor}">
|
controls:CustomTabbedPage.BadgeColor="{StaticResource LightGreenColor}">
|
||||||
<views:CartView.Icon>
|
<views:BasketView.Icon>
|
||||||
<OnPlatform
|
<OnPlatform
|
||||||
x:TypeArguments="FileImageSource"
|
x:TypeArguments="FileImageSource"
|
||||||
Android="menu_cart"
|
Android="menu_cart"
|
||||||
iOS="menu_cart"
|
iOS="menu_cart"
|
||||||
WinPhone="Assets\menu_cart.png"/>
|
WinPhone="Assets\menu_cart.png"/>
|
||||||
</views:CartView.Icon>
|
</views:BasketView.Icon>
|
||||||
</views:CartView>
|
</views:BasketView>
|
||||||
</TabbedPage>
|
</TabbedPage>
|
@ -27,11 +27,16 @@ namespace eShopOnContainers.Core.Views
|
|||||||
CurrentPage = ProfileView;
|
CurrentPage = ProfileView;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
CurrentPage = CartView;
|
CurrentPage = BasketView;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var basketViewModel = ViewModelLocator.Instance.Resolve<BasketViewModel>();
|
||||||
|
await basketViewModel.InitializeAsync(null);
|
||||||
|
BasketView.BindingContext = basketViewModel;
|
||||||
|
|
||||||
var homeViewModel = ViewModelLocator.Instance.Resolve<CatalogViewModel>();
|
var homeViewModel = ViewModelLocator.Instance.Resolve<CatalogViewModel>();
|
||||||
await homeViewModel.InitializeAsync(null);
|
await homeViewModel.InitializeAsync(null);
|
||||||
HomeView.BindingContext = homeViewModel;
|
HomeView.BindingContext = homeViewModel;
|
||||||
@ -39,10 +44,6 @@ namespace eShopOnContainers.Core.Views
|
|||||||
var profileViewModel = ViewModelLocator.Instance.Resolve<ProfileViewModel>();
|
var profileViewModel = ViewModelLocator.Instance.Resolve<ProfileViewModel>();
|
||||||
await profileViewModel.InitializeAsync(null);
|
await profileViewModel.InitializeAsync(null);
|
||||||
ProfileView.BindingContext = profileViewModel;
|
ProfileView.BindingContext = profileViewModel;
|
||||||
|
|
||||||
var cartViewModel = ViewModelLocator.Instance.Resolve<CartViewModel>();
|
|
||||||
await cartViewModel.InitializeAsync(null);
|
|
||||||
CartView.BindingContext = cartViewModel;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="eShopOnContainers.Core.Views.Templates.CartOrderItemTemplate"
|
x:Class="eShopOnContainers.Core.Views.Templates.BasketItemTemplate"
|
||||||
xmlns:controls="clr-namespace:eShopOnContainers.Core.Controls;assembly=eShopOnContainers.Core"
|
xmlns:controls="clr-namespace:eShopOnContainers.Core.Controls;assembly=eShopOnContainers.Core"
|
||||||
xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms">
|
xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms">
|
||||||
<ContentView.Resources>
|
<ContentView.Resources>
|
||||||
@ -82,7 +82,7 @@
|
|||||||
<ffimageloading:CachedImage
|
<ffimageloading:CachedImage
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Source="{Binding ProductImage, Converter={StaticResource ImageConverter}}"
|
Source="{Binding PictureUrl, Converter={StaticResource ImageConverter}}"
|
||||||
CacheDuration="30"
|
CacheDuration="30"
|
||||||
CacheType="Disk"
|
CacheType="Disk"
|
||||||
DownsampleToViewSize="True"
|
DownsampleToViewSize="True"
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace eShopOnContainers.Core.Views.Templates
|
namespace eShopOnContainers.Core.Views.Templates
|
||||||
{
|
{
|
||||||
public partial class CartOrderItemTemplate : ContentView
|
public partial class BasketItemTemplate : ContentView
|
||||||
{
|
{
|
||||||
public CartOrderItemTemplate()
|
public BasketItemTemplate()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
@ -89,7 +89,7 @@
|
|||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Style="{StaticResource AddButtonStyle}">
|
Style="{StaticResource AddButtonStyle}">
|
||||||
<controls:CartButton />
|
<controls:AddBasketButton />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label
|
<Label
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
<Compile Include="Behaviors\Base\BindableBehavior.cs" />
|
<Compile Include="Behaviors\Base\BindableBehavior.cs" />
|
||||||
<Compile Include="Behaviors\EventToCommandBehavior.cs" />
|
<Compile Include="Behaviors\EventToCommandBehavior.cs" />
|
||||||
<Compile Include="Controls\BindablePicker.cs" />
|
<Compile Include="Controls\BindablePicker.cs" />
|
||||||
<Compile Include="Controls\CartButton.xaml.cs">
|
<Compile Include="Controls\AddBasketButton.xaml.cs">
|
||||||
<DependentUpon>CartButton.xaml</DependentUpon>
|
<DependentUpon>AddBasketButton.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Controls\CustomTabbedPage.cs" />
|
<Compile Include="Controls\CustomTabbedPage.cs" />
|
||||||
<Compile Include="Controls\ToggleButton.cs" />
|
<Compile Include="Controls\ToggleButton.cs" />
|
||||||
@ -64,10 +64,12 @@
|
|||||||
<Compile Include="GlobalSettings.cs" />
|
<Compile Include="GlobalSettings.cs" />
|
||||||
<Compile Include="Helpers\EasingHelper.cs" />
|
<Compile Include="Helpers\EasingHelper.cs" />
|
||||||
<Compile Include="Helpers\NumericHelper.cs" />
|
<Compile Include="Helpers\NumericHelper.cs" />
|
||||||
|
<Compile Include="Models\Basket\BasketItem.cs" />
|
||||||
<Compile Include="Models\Catalog\CatalogBrand.cs" />
|
<Compile Include="Models\Catalog\CatalogBrand.cs" />
|
||||||
<Compile Include="Models\Catalog\CatalogRoot.cs" />
|
<Compile Include="Models\Catalog\CatalogRoot.cs" />
|
||||||
<Compile Include="Models\Catalog\CatalogType.cs" />
|
<Compile Include="Models\Catalog\CatalogType.cs" />
|
||||||
<Compile Include="Models\Navigation\TabParameter.cs" />
|
<Compile Include="Models\Navigation\TabParameter.cs" />
|
||||||
|
<Compile Include="Models\Basket\CustomerBasket.cs" />
|
||||||
<Compile Include="Models\Orders\Order.cs" />
|
<Compile Include="Models\Orders\Order.cs" />
|
||||||
<Compile Include="Models\Orders\OrderItem.cs" />
|
<Compile Include="Models\Orders\OrderItem.cs" />
|
||||||
<Compile Include="Models\Orders\OrderStatus.cs" />
|
<Compile Include="Models\Orders\OrderStatus.cs" />
|
||||||
@ -81,10 +83,11 @@
|
|||||||
<Compile Include="Services\Navigation\NavigationService.cs" />
|
<Compile Include="Services\Navigation\NavigationService.cs" />
|
||||||
<Compile Include="Services\OpenUrl\IOpenUrlService.cs" />
|
<Compile Include="Services\OpenUrl\IOpenUrlService.cs" />
|
||||||
<Compile Include="Services\OpenUrl\OpenUrlService.cs" />
|
<Compile Include="Services\OpenUrl\OpenUrlService.cs" />
|
||||||
<Compile Include="Services\Orders\OrdersMockService.cs" />
|
<Compile Include="Services\Basket\BasketMockService.cs" />
|
||||||
<Compile Include="Services\Orders\IOrdersService.cs" />
|
<Compile Include="Services\Basket\IBasketService.cs" />
|
||||||
<Compile Include="Services\Catalog\CatalogMockService.cs" />
|
<Compile Include="Services\Catalog\CatalogMockService.cs" />
|
||||||
<Compile Include="Services\Catalog\ICatalogService.cs" />
|
<Compile Include="Services\Catalog\ICatalogService.cs" />
|
||||||
|
<Compile Include="Services\Basket\BasketService.cs" />
|
||||||
<Compile Include="Services\RequestProvider\IRequestProvider.cs" />
|
<Compile Include="Services\RequestProvider\IRequestProvider.cs" />
|
||||||
<Compile Include="Services\RequestProvider\RequestProvider.cs" />
|
<Compile Include="Services\RequestProvider\RequestProvider.cs" />
|
||||||
<Compile Include="Services\User\IUserService.cs" />
|
<Compile Include="Services\User\IUserService.cs" />
|
||||||
@ -98,7 +101,7 @@
|
|||||||
<Compile Include="ViewModels\Base\MessengerKeys.cs" />
|
<Compile Include="ViewModels\Base\MessengerKeys.cs" />
|
||||||
<Compile Include="ViewModels\Base\ViewModelBase.cs" />
|
<Compile Include="ViewModels\Base\ViewModelBase.cs" />
|
||||||
<Compile Include="ViewModels\Base\ViewModelLocator.cs" />
|
<Compile Include="ViewModels\Base\ViewModelLocator.cs" />
|
||||||
<Compile Include="ViewModels\CartViewModel.cs" />
|
<Compile Include="ViewModels\BasketViewModel.cs" />
|
||||||
<Compile Include="ViewModels\CatalogViewModel.cs" />
|
<Compile Include="ViewModels\CatalogViewModel.cs" />
|
||||||
<Compile Include="ViewModels\CheckoutViewModel.cs" />
|
<Compile Include="ViewModels\CheckoutViewModel.cs" />
|
||||||
<Compile Include="ViewModels\LoginViewModel.cs" />
|
<Compile Include="ViewModels\LoginViewModel.cs" />
|
||||||
@ -106,8 +109,8 @@
|
|||||||
<Compile Include="ViewModels\OrderDetailViewModel.cs" />
|
<Compile Include="ViewModels\OrderDetailViewModel.cs" />
|
||||||
<Compile Include="ViewModels\ProfileViewModel.cs" />
|
<Compile Include="ViewModels\ProfileViewModel.cs" />
|
||||||
<Compile Include="ViewModels\SettingsViewModel.cs" />
|
<Compile Include="ViewModels\SettingsViewModel.cs" />
|
||||||
<Compile Include="Views\CartView.xaml.cs">
|
<Compile Include="Views\BasketView.xaml.cs">
|
||||||
<DependentUpon>CartView.xaml</DependentUpon>
|
<DependentUpon>BasketView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Views\CheckoutView.xaml.cs">
|
<Compile Include="Views\CheckoutView.xaml.cs">
|
||||||
<DependentUpon>CheckoutView.xaml</DependentUpon>
|
<DependentUpon>CheckoutView.xaml</DependentUpon>
|
||||||
@ -136,8 +139,8 @@
|
|||||||
<Compile Include="Views\SettingsView.xaml.cs">
|
<Compile Include="Views\SettingsView.xaml.cs">
|
||||||
<DependentUpon>SettingsView.xaml</DependentUpon>
|
<DependentUpon>SettingsView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Views\Templates\CartOrderItemTemplate.xaml.cs">
|
<Compile Include="Views\Templates\BasketItemTemplate.xaml.cs">
|
||||||
<DependentUpon>CartOrderItemTemplate.xaml</DependentUpon>
|
<DependentUpon>BasketItemTemplate.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Views\Templates\OrderItemTemplate.xaml.cs">
|
<Compile Include="Views\Templates\OrderItemTemplate.xaml.cs">
|
||||||
<DependentUpon>OrderItemTemplate.xaml</DependentUpon>
|
<DependentUpon>OrderItemTemplate.xaml</DependentUpon>
|
||||||
@ -254,7 +257,7 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Views\CartView.xaml">
|
<EmbeddedResource Include="Views\BasketView.xaml">
|
||||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@ -314,13 +317,13 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Views\Templates\CartOrderItemTemplate.xaml">
|
<EmbeddedResource Include="Views\Templates\BasketItemTemplate.xaml">
|
||||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Controls\CartButton.xaml">
|
<EmbeddedResource Include="Controls\AddBasketButton.xaml">
|
||||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@ -338,9 +341,7 @@
|
|||||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets'))" />
|
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets" Condition="Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" />
|
|
||||||
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
||||||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||||
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||||
<package id="SlideOverKit" version="2.1.4" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
<package id="SlideOverKit" version="2.1.4" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||||
<package id="Splat" version="1.6.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
<package id="Splat" version="1.6.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||||
<package id="StyleCop.MSBuild" version="5.0.0-alpha01" targetFramework="portable45-net45+win8+wp8+wpa81" developmentDependency="true" />
|
|
||||||
<package id="Unity" version="4.0.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
<package id="Unity" version="4.0.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||||
<package id="Xamarin.FFImageLoading" version="2.2.6-pre-232" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
<package id="Xamarin.FFImageLoading" version="2.2.6-pre-232" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||||
<package id="Xamarin.FFImageLoading.Forms" version="2.2.6-pre-232" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
<package id="Xamarin.FFImageLoading.Forms" version="2.2.6-pre-232" targetFramework="portable45-net45+win8+wp8+wpa81" />
|
||||||
|
@ -354,9 +354,7 @@
|
|||||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
|
<Error Condition="!Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets" Condition="Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" />
|
|
||||||
<Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
|
<Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
|
||||||
</Project>
|
</Project>
|
@ -9,7 +9,6 @@
|
|||||||
<package id="Newtonsoft.Json" version="9.0.2-beta1" targetFramework="monoandroid70" />
|
<package id="Newtonsoft.Json" version="9.0.2-beta1" targetFramework="monoandroid70" />
|
||||||
<package id="SlideOverKit" version="2.1.4" targetFramework="monoandroid70" />
|
<package id="SlideOverKit" version="2.1.4" targetFramework="monoandroid70" />
|
||||||
<package id="Splat" version="1.6.2" targetFramework="monoandroid70" />
|
<package id="Splat" version="1.6.2" targetFramework="monoandroid70" />
|
||||||
<package id="StyleCop.MSBuild" version="5.0.0-alpha01" targetFramework="monoandroid70" developmentDependency="true" />
|
|
||||||
<package id="System.Collections" version="4.0.11" targetFramework="monoandroid70" />
|
<package id="System.Collections" version="4.0.11" targetFramework="monoandroid70" />
|
||||||
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="monoandroid70" />
|
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="monoandroid70" />
|
||||||
<package id="System.Dynamic.Runtime" version="4.0.11" targetFramework="monoandroid70" />
|
<package id="System.Dynamic.Runtime" version="4.0.11" targetFramework="monoandroid70" />
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
|
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
|
||||||
"Newtonsoft.Json": "9.0.1",
|
"Newtonsoft.Json": "9.0.1",
|
||||||
"SlideOverKit": "2.1.4",
|
"SlideOverKit": "2.1.4",
|
||||||
"StyleCop.MSBuild": "5.0.0-alpha01",
|
|
||||||
"Unity": "4.0.1",
|
"Unity": "4.0.1",
|
||||||
"Xamarin.FFImageLoading": "2.2.6-pre-232",
|
"Xamarin.FFImageLoading": "2.2.6-pre-232",
|
||||||
"Xamarin.FFImageLoading.Forms": "2.2.6-pre-232",
|
"Xamarin.FFImageLoading.Forms": "2.2.6-pre-232",
|
||||||
|
@ -374,9 +374,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets" Condition="Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" />
|
|
||||||
<Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
|
<Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
|
||||||
</Project>
|
</Project>
|
@ -7,7 +7,6 @@
|
|||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="xamarinios10" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="xamarinios10" />
|
||||||
<package id="SlideOverKit" version="2.1.4" targetFramework="xamarinios10" />
|
<package id="SlideOverKit" version="2.1.4" targetFramework="xamarinios10" />
|
||||||
<package id="Splat" version="1.6.2" targetFramework="xamarinios10" />
|
<package id="Splat" version="1.6.2" targetFramework="xamarinios10" />
|
||||||
<package id="StyleCop.MSBuild" version="5.0.0-alpha01" targetFramework="xamarinios10" developmentDependency="true" />
|
|
||||||
<package id="Unity" version="4.0.1" targetFramework="xamarinios10" />
|
<package id="Unity" version="4.0.1" targetFramework="xamarinios10" />
|
||||||
<package id="WebP.Touch" version="1.0.2" targetFramework="xamarinios10" />
|
<package id="WebP.Touch" version="1.0.2" targetFramework="xamarinios10" />
|
||||||
<package id="Xamarin.FFImageLoading" version="2.2.6-pre-232" targetFramework="xamarinios10" />
|
<package id="Xamarin.FFImageLoading" version="2.2.6-pre-232" targetFramework="xamarinios10" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user