Browse Source

Replaced Forms 2.3.3 Device API usage with Forms 2.3.4 Device API usage (aside from XAML).

pull/185/head
David Britch 7 years ago
parent
commit
e83b44e7c1
5 changed files with 12 additions and 12 deletions
  1. +2
    -2
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml.cs
  2. +2
    -2
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Basket/BasketMockService.cs
  3. +5
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Catalog/CatalogMockService.cs
  4. +2
    -2
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderMockService.cs
  5. +1
    -1
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/LoginView.xaml.cs

+ 2
- 2
src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml.cs View File

@ -18,7 +18,7 @@ namespace eShopOnContainers
InitApp();
if (Device.OS == TargetPlatform.Windows)
if (Device.RuntimePlatform == Device.Windows)
{
InitNavigation();
}
@ -40,7 +40,7 @@ namespace eShopOnContainers
{
base.OnStart();
if (Device.OS != TargetPlatform.Windows)
if (Device.RuntimePlatform != Device.Windows)
{
await InitNavigation();
}


+ 2
- 2
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Basket/BasketMockService.cs View File

@ -12,8 +12,8 @@ namespace eShopOnContainers.Core.Services.Basket
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 = Common.Common.MockCatalogItemId01, 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 = Common.Common.MockCatalogItemId04, ProductName = ".NET Black Cupt", Quantity = 1, UnitPrice = 17.00M }
new BasketItem { Id = "1", PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png", ProductId = Common.Common.MockCatalogItemId01, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 19.50M },
new BasketItem { Id = "2", PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_04.png" : "Assets/fake_product_04.png", ProductId = Common.Common.MockCatalogItemId04, ProductName = ".NET Black Cupt", Quantity = 1, UnitPrice = 17.00M }
}
};


+ 5
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Catalog/CatalogMockService.cs View File

@ -24,11 +24,11 @@ namespace eShopOnContainers.Core.Services.Catalog
private ObservableCollection<CatalogItem> MockCatalog = new ObservableCollection<CatalogItem>
{
new CatalogItem { Id = Common.Common.MockCatalogItemId01, PictureUri = Device.OS != TargetPlatform.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png", Name = ".NET Bot Blue Sweatshirt (M)", Price = 19.50M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 2, CatalogType = "T-Shirt" },
new CatalogItem { Id = Common.Common.MockCatalogItemId02, PictureUri = Device.OS != TargetPlatform.Windows ? "fake_product_02.png" : "Assets/fake_product_02.png", Name = ".NET Bot Purple Sweatshirt (M)", Price = 19.50M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 2, CatalogType = "T-Shirt" },
new CatalogItem { Id = Common.Common.MockCatalogItemId03, PictureUri = Device.OS != TargetPlatform.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png", Name = ".NET Bot Black Sweatshirt (M)", Price = 19.95M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 2, CatalogType = "T-Shirt" },
new CatalogItem { Id = Common.Common.MockCatalogItemId04, PictureUri = Device.OS != TargetPlatform.Windows ? "fake_product_04.png" : "Assets/fake_product_04.png", Name = ".NET Black Cupt", Price = 17.00M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 1, CatalogType = "Mug" },
new CatalogItem { Id = Common.Common.MockCatalogItemId05, PictureUri = Device.OS != TargetPlatform.Windows ? "fake_product_05.png" : "Assets/fake_product_05.png", Name = "Azure Black Sweatshirt (M)", Price = 19.50M, CatalogBrandId = 1, CatalogBrand = "Azure", CatalogTypeId = 2, CatalogType = "T-Shirt" }
new CatalogItem { Id = Common.Common.MockCatalogItemId01, PictureUri = Device.RuntimePlatform != Device.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png", Name = ".NET Bot Blue Sweatshirt (M)", Price = 19.50M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 2, CatalogType = "T-Shirt" },
new CatalogItem { Id = Common.Common.MockCatalogItemId02, PictureUri = Device.RuntimePlatform != Device.Windows ? "fake_product_02.png" : "Assets/fake_product_02.png", Name = ".NET Bot Purple Sweatshirt (M)", Price = 19.50M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 2, CatalogType = "T-Shirt" },
new CatalogItem { Id = Common.Common.MockCatalogItemId03, PictureUri = Device.RuntimePlatform != Device.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png", Name = ".NET Bot Black Sweatshirt (M)", Price = 19.95M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 2, CatalogType = "T-Shirt" },
new CatalogItem { Id = Common.Common.MockCatalogItemId04, PictureUri = Device.RuntimePlatform != Device.Windows ? "fake_product_04.png" : "Assets/fake_product_04.png", Name = ".NET Black Cupt", Price = 17.00M, CatalogBrandId = 2, CatalogBrand = "Visual Studio", CatalogTypeId = 1, CatalogType = "Mug" },
new CatalogItem { Id = Common.Common.MockCatalogItemId05, PictureUri = Device.RuntimePlatform != Device.Windows ? "fake_product_05.png" : "Assets/fake_product_05.png", Name = "Azure Black Sweatshirt (M)", Price = 19.50M, CatalogBrandId = 1, CatalogBrand = "Azure", CatalogTypeId = 2, CatalogType = "T-Shirt" }
};
public async Task<ObservableCollection<CatalogItem>> GetCatalogAsync()


+ 2
- 2
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderMockService.cs View File

@ -53,8 +53,8 @@ namespace eShopOnContainers.Core.Services.Order
private static List<OrderItem> MockOrderItems = new List<OrderItem>()
{
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId01, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M, PictureUrl = Device.OS != TargetPlatform.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png" },
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId03, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M, PictureUrl = Device.OS != TargetPlatform.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png" }
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId01, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png" },
new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId03, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png" }
};
private static List<CardType> MockCardTypes = new List<CardType>()


+ 1
- 1
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/LoginView.xaml.cs View File

@ -41,7 +41,7 @@ namespace eShopOnContainers.Core.Views
public async Task AnimateIn()
{
if (Device.OS == TargetPlatform.Windows)
if (Device.RuntimePlatform == Device.Windows)
{
return;
}


Loading…
Cancel
Save