Merge branch 'feature/display-marketing-campaigns-on-xamarin' into dev
@ -48,6 +48,8 @@
|
||||
|
||||
public string LocationEndpoint { get; set; }
|
||||
|
||||
public string MarketingEndpoint { get; set; }
|
||||
|
||||
public string UserInfoEndpoint { get; set; }
|
||||
|
||||
public string TokenEndpoint { get; set; }
|
||||
@ -60,17 +62,18 @@
|
||||
|
||||
private void UpdateEndpoint(string baseEndpoint)
|
||||
{
|
||||
RegisterWebsite = string.Format("{0}:5105/Account/Register", baseEndpoint);
|
||||
CatalogEndpoint = string.Format("{0}:5101", baseEndpoint);
|
||||
OrdersEndpoint = string.Format("{0}:5102", baseEndpoint);
|
||||
BasketEndpoint = string.Format("{0}:5103", baseEndpoint);
|
||||
IdentityEndpoint = string.Format("{0}:5105/connect/authorize", baseEndpoint);
|
||||
UserInfoEndpoint = string.Format("{0}:5105/connect/userinfo", baseEndpoint);
|
||||
TokenEndpoint = string.Format("{0}:5105/connect/token", baseEndpoint);
|
||||
LogoutEndpoint = string.Format("{0}:5105/connect/endsession", baseEndpoint);
|
||||
IdentityCallback = string.Format("{0}:5105/xamarincallback", baseEndpoint);
|
||||
LogoutCallback = string.Format("{0}:5105/Account/Redirecting", baseEndpoint);
|
||||
LocationEndpoint = string.Format("{0}:5109", baseEndpoint);
|
||||
RegisterWebsite = $"{baseEndpoint}:5105/Account/Register";
|
||||
CatalogEndpoint = $"{baseEndpoint}:5101";
|
||||
OrdersEndpoint = $"{baseEndpoint}:5102";
|
||||
BasketEndpoint = $"{baseEndpoint}:5103";
|
||||
IdentityEndpoint = $"{baseEndpoint}:5105/connect/authorize";
|
||||
UserInfoEndpoint = $"{baseEndpoint}:5105/connect/userinfo";
|
||||
TokenEndpoint = $"{baseEndpoint}:5105/connect/token";
|
||||
LogoutEndpoint = $"{baseEndpoint}:5105/connect/endsession";
|
||||
IdentityCallback = $"{baseEndpoint}:5105/xamarincallback";
|
||||
LogoutCallback = $"{baseEndpoint}:5105/Account/Redirecting";
|
||||
LocationEndpoint = $"{baseEndpoint}:5109";
|
||||
MarketingEndpoint = $"{baseEndpoint}:5110";
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using eShopOnContainers.Core.Models.Basket;
|
||||
using eShopOnContainers.Core.Models.Catalog;
|
||||
using eShopOnContainers.Core.Models.Marketing;
|
||||
using eShopOnContainers.Core.ViewModels.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -76,5 +77,38 @@ namespace eShopOnContainers.Core.Helpers
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void FixCatalogItemPictureUri(IEnumerable<CampaignItem> campaignItems)
|
||||
{
|
||||
if (campaignItems == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!ViewModelLocator.UseMockService
|
||||
&& Settings.UrlBase != GlobalSetting.DefaultEndpoint)
|
||||
{
|
||||
foreach (var catalogItem in campaignItems)
|
||||
{
|
||||
MatchCollection serverResult = IpRegex.Matches(catalogItem.PictureUri);
|
||||
MatchCollection localResult = IpRegex.Matches(Settings.UrlBase);
|
||||
|
||||
if (serverResult.Count != -1 && localResult.Count != -1)
|
||||
{
|
||||
var serviceIp = serverResult[0].Value;
|
||||
var localIp = localResult[0].Value;
|
||||
|
||||
catalogItem.PictureUri = catalogItem.PictureUri.Replace(serviceIp, localIp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ namespace eShopOnContainers.Core.Helpers
|
||||
|
||||
#region Setting Constants
|
||||
|
||||
private const string IdUserId = "user_id";
|
||||
private const string AccessToken = "access_token";
|
||||
private const string IdToken = "id_token";
|
||||
private const string IdUseMocks = "use_mocks";
|
||||
@ -31,10 +32,18 @@ namespace eShopOnContainers.Core.Helpers
|
||||
private static readonly string IdTokenDefault = string.Empty;
|
||||
private static readonly bool UseMocksDefault = true;
|
||||
private static readonly bool UseFakeLocationDefault = false;
|
||||
private static readonly double FakeLatitudeValue = 47.604610d;
|
||||
private static readonly double FakeLongitudeValue = -122.315752d;
|
||||
private static readonly string UrlBaseDefault = GlobalSetting.Instance.BaseEndpoint;
|
||||
|
||||
#endregion
|
||||
|
||||
public static string UserId
|
||||
{
|
||||
get { return AppSettings.GetValueOrDefault<string>(IdUserId); }
|
||||
set { AppSettings.AddOrUpdateValue<string>(IdUserId, value); }
|
||||
}
|
||||
|
||||
public static string AuthAccessToken
|
||||
{
|
||||
get
|
||||
@ -99,7 +108,7 @@ namespace eShopOnContainers.Core.Helpers
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppSettings.GetValueOrDefault<double>(IdFakeLatitude);
|
||||
return AppSettings.GetValueOrDefault<double>(IdFakeLatitude, FakeLatitudeValue);
|
||||
}
|
||||
set
|
||||
{
|
||||
@ -110,7 +119,7 @@ namespace eShopOnContainers.Core.Helpers
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppSettings.GetValueOrDefault<double>(IdFakeLongitude);
|
||||
return AppSettings.GetValueOrDefault<double>(IdFakeLongitude, FakeLongitudeValue);
|
||||
}
|
||||
set
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace eShopOnContainers.Core.Models.Location
|
||||
{
|
||||
public class LocationRequest
|
||||
public class Location
|
||||
{
|
||||
public double Longitude { get; set; }
|
||||
public double Latitude { get; set; }
|
@ -0,0 +1,19 @@
|
||||
namespace eShopOnContainers.Core.Models.Marketing
|
||||
{
|
||||
using System;
|
||||
|
||||
public class Campaign
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public DateTime From { get; set; }
|
||||
|
||||
public DateTime To { get; set; }
|
||||
|
||||
public string PictureUri { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
namespace eShopOnContainers.Core.Models.Marketing
|
||||
{
|
||||
using System;
|
||||
|
||||
public class CampaignItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public DateTime From { get; set; }
|
||||
|
||||
public DateTime To { get; set; }
|
||||
|
||||
public string PictureUri { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
namespace eShopOnContainers.Core.Models.Marketing
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class CampaignRoot
|
||||
{
|
||||
public int PageIndex { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int Count { get; set; }
|
||||
public List<CampaignItem> Data { get; set; }
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
using System;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Basket
|
||||
{
|
||||
@ -57,5 +58,10 @@ namespace eShopOnContainers.Core.Services.Basket
|
||||
MockCustomBasket.Items.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public Task CheckoutAsync(BasketCheckout basketCheckout, string token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -7,5 +7,8 @@
|
||||
public static string MockCatalogItemId03 = "3";
|
||||
public static string MockCatalogItemId04 = "4";
|
||||
public static string MockCatalogItemId05 = "5";
|
||||
|
||||
public static int MockCampaignd01 = 1;
|
||||
public static int MockCampaignd02 = 2;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace eShopOnContainers.Core.Services.Identity
|
||||
dic.Add("client_id", GlobalSetting.Instance.ClientId);
|
||||
dic.Add("client_secret", GlobalSetting.Instance.ClientSecret);
|
||||
dic.Add("response_type", "code id_token");
|
||||
dic.Add("scope", "openid profile basket orders locations offline_access");
|
||||
dic.Add("scope", "openid profile basket orders locations marketing offline_access");
|
||||
dic.Add("redirect_uri", GlobalSetting.Instance.IdentityCallback);
|
||||
dic.Add("nonce", Guid.NewGuid().ToString("N"));
|
||||
|
||||
|
@ -5,6 +5,6 @@
|
||||
|
||||
public interface ILocationService
|
||||
{
|
||||
Task UpdateUserLocation(LocationRequest newLocReq, string token);
|
||||
Task UpdateUserLocation(Location newLocReq, string token);
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
_requestProvider = requestProvider;
|
||||
}
|
||||
|
||||
public async Task UpdateUserLocation(LocationRequest newLocReq, string token)
|
||||
public async Task UpdateUserLocation(Location newLocReq, string token)
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.LocationEndpoint);
|
||||
|
||||
|
@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Marketing
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using Models.Marketing;
|
||||
using Xamarin.Forms;
|
||||
|
||||
public class CampaignMockService : ICampaignService
|
||||
{
|
||||
private readonly ObservableCollection<CampaignItem> _mockCampaign = new ObservableCollection<CampaignItem>
|
||||
{
|
||||
new CampaignItem
|
||||
{
|
||||
Id = Common.Common.MockCampaignd01,
|
||||
PictureUri = Device.RuntimePlatform != Device.Windows
|
||||
? "fake_campaign_01.png"
|
||||
: "Assets/fake_campaign_01.png",
|
||||
Name = ".NET Bot Black Hoodie 50% OFF",
|
||||
Description = "Campaign Description 1",
|
||||
From = DateTime.Now,
|
||||
To = DateTime.Now.AddDays(7)
|
||||
},
|
||||
|
||||
new CampaignItem
|
||||
{
|
||||
Id = Common.Common.MockCampaignd02,
|
||||
PictureUri = Device.RuntimePlatform != Device.Windows
|
||||
? "fake_campaign_02.png"
|
||||
: "Assets/fake_campaign_02.png",
|
||||
Name = "Roslyn Red T-Shirt 3x2",
|
||||
Description = "Campaign Description 2",
|
||||
From = DateTime.Now.AddDays(-7),
|
||||
To = DateTime.Now.AddDays(14)
|
||||
}
|
||||
};
|
||||
|
||||
public async Task<ObservableCollection<CampaignItem>> GetAllCampaignsAsync(string userId, string token)
|
||||
{
|
||||
await Task.Delay(500);
|
||||
|
||||
return _mockCampaign;
|
||||
}
|
||||
|
||||
public async Task<CampaignItem> GetCampaignByIdAsync(int campaignId, string token)
|
||||
{
|
||||
return _mockCampaign.SingleOrDefault(c => c.Id == campaignId);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
using eShopOnContainers.Core.Extensions;
|
||||
using eShopOnContainers.Core.Helpers;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Marketing
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using Models.Marketing;
|
||||
using RequestProvider;
|
||||
|
||||
public class CampaignService : ICampaignService
|
||||
{
|
||||
private readonly IRequestProvider _requestProvider;
|
||||
|
||||
public CampaignService(IRequestProvider requestProvider)
|
||||
{
|
||||
_requestProvider = requestProvider;
|
||||
}
|
||||
|
||||
public async Task<ObservableCollection<CampaignItem>> GetAllCampaignsAsync(string userId, string token)
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.MarketingEndpoint);
|
||||
|
||||
builder.Path = $"api/v1/campaigns/user/{userId}";
|
||||
|
||||
string uri = builder.ToString();
|
||||
|
||||
CampaignRoot campaign =
|
||||
await _requestProvider.GetAsync<CampaignRoot>(uri, token);
|
||||
|
||||
if (campaign?.Data != null)
|
||||
{
|
||||
ServicesHelper.FixCatalogItemPictureUri(campaign?.Data);
|
||||
|
||||
return campaign?.Data.ToObservableCollection();
|
||||
}
|
||||
|
||||
return new ObservableCollection<CampaignItem>();
|
||||
}
|
||||
|
||||
public async Task<CampaignItem> GetCampaignByIdAsync(int campaignId, string token)
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.MarketingEndpoint);
|
||||
|
||||
builder.Path = $"api/v1/campaigns/{campaignId}";
|
||||
|
||||
string uri = builder.ToString();
|
||||
|
||||
return await _requestProvider.GetAsync<CampaignItem>(uri, token);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
|
||||
namespace eShopOnContainers.Core.Services.Marketing
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using Models.Marketing;
|
||||
|
||||
public interface ICampaignService
|
||||
{
|
||||
Task<ObservableCollection<CampaignItem>> GetAllCampaignsAsync(string userId, string token);
|
||||
|
||||
Task<CampaignItem> GetCampaignByIdAsync(int id, string token);
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ using eShopOnContainers.Core.Services.Order;
|
||||
using eShopOnContainers.Core.Services.User;
|
||||
using Xamarin.Forms;
|
||||
using eShopOnContainers.Core.Services.Location;
|
||||
using eShopOnContainers.Core.Services.Marketing;
|
||||
|
||||
namespace eShopOnContainers.Core.ViewModels.Base
|
||||
{
|
||||
@ -47,9 +48,11 @@ namespace eShopOnContainers.Core.ViewModels.Base
|
||||
builder.RegisterType<OrderDetailViewModel>();
|
||||
builder.RegisterType<ProfileViewModel>();
|
||||
builder.RegisterType<SettingsViewModel>();
|
||||
builder.RegisterType<CampaignViewModel>();
|
||||
builder.RegisterType<CampaignDetailsViewModel>();
|
||||
|
||||
// Services
|
||||
builder.RegisterType<NavigationService>().As<INavigationService>().SingleInstance();
|
||||
// Services
|
||||
builder.RegisterType<NavigationService>().As<INavigationService>().SingleInstance();
|
||||
builder.RegisterType<DialogService>().As<IDialogService>();
|
||||
builder.RegisterType<OpenUrlService>().As<IOpenUrlService>();
|
||||
builder.RegisterType<IdentityService>().As<IIdentityService>();
|
||||
@ -62,6 +65,7 @@ namespace eShopOnContainers.Core.ViewModels.Base
|
||||
builder.RegisterInstance(new BasketMockService()).As<IBasketService>();
|
||||
builder.RegisterInstance(new OrderMockService()).As<IOrderService>();
|
||||
builder.RegisterInstance(new UserMockService()).As<IUserService>();
|
||||
builder.RegisterInstance(new CampaignMockService()).As<ICampaignService>();
|
||||
|
||||
UseMockService = true;
|
||||
}
|
||||
@ -70,7 +74,8 @@ namespace eShopOnContainers.Core.ViewModels.Base
|
||||
builder.RegisterType<CatalogService>().As<ICatalogService>().SingleInstance();
|
||||
builder.RegisterType<BasketService>().As<IBasketService>().SingleInstance();
|
||||
builder.RegisterType<OrderService>().As<IOrderService>().SingleInstance();
|
||||
builder.RegisterType<UserService>().As<IUserService>().SingleInstance();
|
||||
builder.RegisterType<UserService>().As<IUserService>().SingleInstance();
|
||||
builder.RegisterType<CampaignService>().As<ICampaignService>().SingleInstance();
|
||||
|
||||
UseMockService = false;
|
||||
}
|
||||
|
@ -0,0 +1,42 @@
|
||||
namespace eShopOnContainers.Core.ViewModels
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
using Helpers;
|
||||
using Models.Marketing;
|
||||
using Services.Marketing;
|
||||
using Base;
|
||||
|
||||
public class CampaignDetailsViewModel : ViewModelBase
|
||||
{
|
||||
private CampaignItem _campaign;
|
||||
private readonly ICampaignService _campaignService;
|
||||
|
||||
public CampaignDetailsViewModel(ICampaignService campaignService)
|
||||
{
|
||||
_campaignService = campaignService;
|
||||
}
|
||||
|
||||
public CampaignItem Campaign
|
||||
{
|
||||
get => _campaign;
|
||||
set
|
||||
{
|
||||
_campaign = value;
|
||||
RaisePropertyChanged(() => Campaign);
|
||||
}
|
||||
}
|
||||
|
||||
public override async Task InitializeAsync(object navigationData)
|
||||
{
|
||||
if (navigationData is int)
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
// Get campaign by id
|
||||
Campaign = await _campaignService.GetCampaignByIdAsync((int) navigationData, Settings.AuthAccessToken);
|
||||
|
||||
IsBusy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
namespace eShopOnContainers.Core.ViewModels
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Xamarin.Forms;
|
||||
using System.Collections.ObjectModel;
|
||||
using Models.Marketing;
|
||||
using Services.Marketing;
|
||||
using Base;
|
||||
using Helpers;
|
||||
|
||||
public class CampaignViewModel : ViewModelBase
|
||||
{
|
||||
private ObservableCollection<CampaignItem> _campaigns;
|
||||
private readonly ICampaignService _campaignService;
|
||||
|
||||
public CampaignViewModel(ICampaignService campaignService)
|
||||
{
|
||||
_campaignService = campaignService;
|
||||
}
|
||||
|
||||
public ObservableCollection<CampaignItem> Campaigns
|
||||
{
|
||||
get => _campaigns;
|
||||
set
|
||||
{
|
||||
_campaigns = value;
|
||||
RaisePropertyChanged(() => Campaigns);
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand GetCampaignDetailsCommand => new Command<CampaignItem>(async (item) => await GetCampaignDetails(item));
|
||||
|
||||
public override async Task InitializeAsync(object navigationData)
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
// Get campaigns by user
|
||||
Campaigns = await _campaignService.GetAllCampaignsAsync(Settings.UserId, Settings.AuthAccessToken);
|
||||
|
||||
IsBusy = false;
|
||||
}
|
||||
|
||||
private async Task GetCampaignDetails(CampaignItem campaign)
|
||||
{
|
||||
await NavigationService.NavigateToAsync<CampaignDetailsViewModel>(campaign.Id);
|
||||
}
|
||||
}
|
||||
}
|
@ -214,9 +214,10 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
if (Settings.UseMocks)
|
||||
{
|
||||
Settings.AuthAccessToken = string.Empty;
|
||||
Settings.AuthIdToken = string.Empty;
|
||||
Settings.AuthIdToken = string.Empty;
|
||||
}
|
||||
|
||||
Settings.UserId = string.Empty;
|
||||
Settings.UseFakeLocation = false;
|
||||
}
|
||||
|
||||
@ -243,7 +244,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
{
|
||||
Settings.AuthAccessToken = accessToken;
|
||||
Settings.AuthIdToken = authResponse.IdentityToken;
|
||||
|
||||
Settings.UserId = authResponse.Values["sub"];
|
||||
await NavigationService.NavigateToAsync<MainViewModel>();
|
||||
await NavigationService.RemoveLastFromBackStackAsync();
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
|
||||
private async Task ToggleSendLocationAsync()
|
||||
{
|
||||
LocationRequest locationRequest = new LocationRequest
|
||||
Location locationRequest = new Location
|
||||
{
|
||||
Latitude = _latitude,
|
||||
Longitude = _longitude
|
||||
|
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="eShopOnContainers.Core.Views.CampaignDetailsView"
|
||||
xmlns:viewModelBase="clr-namespace:eShopOnContainers.Core.ViewModels.Base;assembly=eShopOnContainers.Core"
|
||||
viewModelBase:ViewModelLocator.AutoWireViewModel="true"
|
||||
Title="Campaign Details">
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style x:Key="CampaignStyle"
|
||||
TargetType="{x:Type StackLayout}">
|
||||
<Setter Property="VerticalOptions"
|
||||
Value="Center" />
|
||||
<Setter Property="Margin"
|
||||
Value="0" />
|
||||
</Style>
|
||||
<Style x:Key="CampaignTitleStyle"
|
||||
TargetType="{x:Type Label}">
|
||||
<Setter Property="FontFamily"
|
||||
Value="{StaticResource MontserratRegular}" />
|
||||
<Setter Property="FontSize"
|
||||
Value="{StaticResource MediumSize}" />
|
||||
<Setter Property="HorizontalOptions"
|
||||
Value="Start" />
|
||||
<Setter Property="VerticalOptions"
|
||||
Value="Center" />
|
||||
<Setter Property="Margin"
|
||||
Value="12, 0" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CampaignDescriptionStyle"
|
||||
TargetType="{x:Type Label}"
|
||||
BasedOn="{StaticResource CampaignTitleStyle}">
|
||||
<Setter Property="FontSize"
|
||||
Value="{StaticResource LittleSize}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<Grid
|
||||
ColumnSpacing="0"
|
||||
RowSpacing="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- CAMPAIGN DETAILS -->
|
||||
<ScrollView>
|
||||
<StackLayout
|
||||
x:Name="Campaign">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="1" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
BackgroundColor="Gray"/>
|
||||
<StackLayout
|
||||
Style ="{StaticResource CampaignStyle}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1">
|
||||
<Image
|
||||
Source="{Binding Campaign.PictureUri, Converter={StaticResource ImageConverter}}"
|
||||
Aspect="AspectFit"
|
||||
VerticalOptions="Start"
|
||||
Margin="12,0,0,0" />
|
||||
<Label
|
||||
Text="{Binding Campaign.Name}"
|
||||
TextColor="{StaticResource GreenColor}"
|
||||
Style="{StaticResource CampaignTitleStyle}"/>
|
||||
<Label
|
||||
Text="{Binding Campaign.Description}"
|
||||
Style="{StaticResource CampaignDescriptionStyle}"/>
|
||||
<StackLayout
|
||||
HorizontalOptions="Center"
|
||||
Margin="12,0,0,0" >
|
||||
<Label
|
||||
Text="{Binding Campaign.From, StringFormat='From {0:MMMM dd, yyyy}'}"
|
||||
Style="{StaticResource CampaignDescriptionStyle}"/>
|
||||
<Label
|
||||
Text="{Binding Campaign.To, StringFormat='until {0:MMMM dd, yyyy}'}"
|
||||
Style="{StaticResource CampaignDescriptionStyle}"/>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
<!-- INDICATOR -->
|
||||
<ActivityIndicator
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Color="{StaticResource LightGreenColor}"
|
||||
IsRunning="{Binding IsBusy}"
|
||||
IsVisible="{Binding IsBusy}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform
|
||||
x:TypeArguments="x:Double"
|
||||
iOS="100"
|
||||
Android="100"
|
||||
WinPhone="400" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
</ActivityIndicator>
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -0,0 +1,12 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace eShopOnContainers.Core.Views
|
||||
{
|
||||
public partial class CampaignDetailsView : ContentPage
|
||||
{
|
||||
public CampaignDetailsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="eShopOnContainers.Core.Views.CampaignView"
|
||||
xmlns:templates="clr-namespace:eShopOnContainers.Core.Views.Templates;assembly=eShopOnContainers.Core"
|
||||
xmlns:views="clr-namespace:eShopOnContainers.Core.Views;assembly=eShopOnContainers.Core"
|
||||
xmlns:viewModelBase="clr-namespace:eShopOnContainers.Core.ViewModels.Base;assembly=eShopOnContainers.Core"
|
||||
xmlns:animations="clr-namespace:eShopOnContainers.Core.Animations;assembly=eShopOnContainers.Core"
|
||||
xmlns:triggers="clr-namespace:eShopOnContainers.Core.Triggers;assembly=eShopOnContainers.Core"
|
||||
xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core"
|
||||
viewModelBase:ViewModelLocator.AutoWireViewModel="true"
|
||||
Title="Catalog">
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
<Style x:Key="CampaignsListStyle"
|
||||
TargetType="{x:Type ListView}">
|
||||
<Setter Property="RowHeight"
|
||||
Value="400" />
|
||||
<Setter Property="VerticalOptions"
|
||||
Value="Center" />
|
||||
<Setter Property="Margin"
|
||||
Value="0" />
|
||||
</Style>
|
||||
<animations:StoryBoard
|
||||
x:Key="CampaignsAnimation"
|
||||
Target="{x:Reference Campaigns}">
|
||||
<animations:FadeInAnimation
|
||||
Direction="Up"
|
||||
Duration="1500"
|
||||
Delay="250"/>
|
||||
</animations:StoryBoard>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<ContentPage.Triggers>
|
||||
<EventTrigger
|
||||
Event="Appearing">
|
||||
<triggers:BeginAnimation
|
||||
Animation="{StaticResource CampaignsAnimation}" />
|
||||
</EventTrigger>
|
||||
</ContentPage.Triggers>
|
||||
<Grid
|
||||
ColumnSpacing="0"
|
||||
RowSpacing="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- CAMPAIGNS -->
|
||||
<Grid
|
||||
Grid.Row="1">
|
||||
<Grid
|
||||
IsVisible="{Binding IsBusy, Converter={StaticResource InverseBoolConverter}}">
|
||||
<Label
|
||||
Text="NO CAMPAIGNS FOUND"
|
||||
IsVisible="{Binding Campaigns.Count, Converter={StaticResource InverseCountToBoolConverter}}"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"/>
|
||||
</Grid>
|
||||
<ListView
|
||||
x:Name="Campaigns"
|
||||
IsVisible="{Binding Campaigns.Count, Converter={StaticResource CountToBoolConverter}}"
|
||||
ItemsSource="{Binding Campaigns}"
|
||||
HasUnevenRows="True"
|
||||
SeparatorVisibility="None"
|
||||
CachingStrategy="RecycleElement"
|
||||
Style="{StaticResource CampaignsListStyle}">
|
||||
<ListView.Behaviors>
|
||||
<behaviors:EventToCommandBehavior
|
||||
EventName="ItemTapped"
|
||||
Command="{Binding GetCampaignDetailsCommand}"
|
||||
EventArgsConverter="{StaticResource ItemTappedEventArgsConverter}" />
|
||||
</ListView.Behaviors>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<templates:CampaignTemplate />
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
<!-- INDICATOR -->
|
||||
<ActivityIndicator
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Color="{StaticResource LightGreenColor}"
|
||||
IsRunning="{Binding IsBusy}"
|
||||
IsVisible="{Binding IsBusy}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform
|
||||
x:TypeArguments="x:Double"
|
||||
iOS="100"
|
||||
Android="100"
|
||||
WinPhone="400" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
</ActivityIndicator>
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -0,0 +1,13 @@
|
||||
namespace eShopOnContainers.Core.Views
|
||||
{
|
||||
using Xamarin.Forms;
|
||||
|
||||
public partial class CampaignView: ContentPage
|
||||
{
|
||||
|
||||
public CampaignView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -63,4 +63,15 @@
|
||||
WinPhone="Assets\menu_cart.png"/>
|
||||
</views:BasketView.Icon>
|
||||
</views:BasketView>
|
||||
<!-- CAMPAIGNS -->
|
||||
<views:CampaignView
|
||||
x:Name="CampaignView">
|
||||
<views:CampaignView.Icon>
|
||||
<OnPlatform
|
||||
x:TypeArguments="FileImageSource"
|
||||
Android="menu_filter"
|
||||
iOS="menu_filter"
|
||||
WinPhone="Assets\menu_filter.png"/>
|
||||
</views:CampaignView.Icon>
|
||||
</views:CampaignView>
|
||||
</TabbedPage>
|
@ -28,12 +28,16 @@ namespace eShopOnContainers.Core.Views
|
||||
case 2:
|
||||
CurrentPage = BasketView;
|
||||
break;
|
||||
case 3:
|
||||
CurrentPage = CampaignView;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
await ((CatalogViewModel)HomeView.BindingContext).InitializeAsync(null);
|
||||
await ((BasketViewModel)BasketView.BindingContext).InitializeAsync(null);
|
||||
await ((ProfileViewModel)ProfileView.BindingContext).InitializeAsync(null);
|
||||
await ((CampaignViewModel)CampaignView.BindingContext).InitializeAsync(null);
|
||||
}
|
||||
|
||||
protected override async void OnCurrentPageChanged()
|
||||
@ -44,6 +48,7 @@ namespace eShopOnContainers.Core.Views
|
||||
{
|
||||
// Force basket view refresh every time we access it
|
||||
await (BasketView.BindingContext as ViewModelBase).InitializeAsync(null);
|
||||
await (CampaignView.BindingContext as ViewModelBase).InitializeAsync(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,6 +98,8 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
|
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
|
||||
xmlns:controls="clr-namespace:eShopOnContainers.Core.Controls;assembly=eShopOnContainers.Core"
|
||||
x:Class="eShopOnContainers.Core.Views.Templates.CampaignTemplate">
|
||||
<ContentView.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
<Style x:Key="CampaignNameStyle"
|
||||
TargetType="{x:Type Label}">
|
||||
<Setter Property="FontFamily"
|
||||
Value="{StaticResource MontserratRegular}" />
|
||||
<Setter Property="FontSize"
|
||||
Value="{StaticResource LargeSize}" />
|
||||
<Setter Property="HorizontalOptions"
|
||||
Value="Center" />
|
||||
<Setter Property="Margin"
|
||||
Value="0, 12, 0, 6" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MoreDetailsButtonStyle"
|
||||
TargetType="{x:Type Grid}">
|
||||
<Setter Property="HeightRequest"
|
||||
Value="42" />
|
||||
<Setter Property="WidthRequest"
|
||||
Value="42" />
|
||||
<Setter Property="HorizontalOptions"
|
||||
Value="Center" />
|
||||
<Setter Property="VerticalOptions"
|
||||
Value="End" />
|
||||
<Setter Property="Margin"
|
||||
Value="0,0,0,24" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="AddImageStyle"
|
||||
TargetType="{x:Type Image}">
|
||||
<Setter Property="HeightRequest"
|
||||
Value="24" />
|
||||
<Setter Property="WidthRequest"
|
||||
Value="24" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ContentView.Resources>
|
||||
<ContentView.Content>
|
||||
<Grid
|
||||
BackgroundColor="{StaticResource BackgroundColor}"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="250" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- IMAGE -->
|
||||
<ffimageloading:CachedImage
|
||||
Grid.Row="0"
|
||||
Source="{Binding PictureUri}"
|
||||
Aspect="AspectFill">
|
||||
<ffimageloading:CachedImage.LoadingPlaceholder>
|
||||
<OnPlatform
|
||||
x:TypeArguments="ImageSource"
|
||||
iOS="default_campaign"
|
||||
Android="default_campaign"
|
||||
WinPhone="Assets/default_campaign.png"/>
|
||||
</ffimageloading:CachedImage.LoadingPlaceholder>
|
||||
<ffimageloading:CachedImage.ErrorPlaceholder>
|
||||
<OnPlatform
|
||||
x:TypeArguments="ImageSource"
|
||||
iOS="noimage"
|
||||
Android="noimage"
|
||||
WinPhone="Assets/noimage.png"/>
|
||||
</ffimageloading:CachedImage.ErrorPlaceholder>
|
||||
</ffimageloading:CachedImage>
|
||||
<!-- NAME -->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="{Binding Name, Converter={StaticResource ToUpperConverter}}"
|
||||
Style="{StaticResource CampaignNameStyle}"/>
|
||||
</Grid>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
@ -0,0 +1,12 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace eShopOnContainers.Core.Views.Templates
|
||||
{
|
||||
public partial class CampaignTemplate : ContentView
|
||||
{
|
||||
public CampaignTemplate()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -71,7 +71,9 @@
|
||||
<Compile Include="Models\Catalog\CatalogItem.cs" />
|
||||
<Compile Include="Models\Catalog\CatalogRoot.cs" />
|
||||
<Compile Include="Models\Catalog\CatalogType.cs" />
|
||||
<Compile Include="Models\Location\LocationRequest.cs" />
|
||||
<Compile Include="Models\Location\Location.cs" />
|
||||
<Compile Include="Models\Marketing\CampaignItem.cs" />
|
||||
<Compile Include="Models\Marketing\CampaignRoot.cs" />
|
||||
<Compile Include="Models\Navigation\TabParameter.cs" />
|
||||
<Compile Include="Models\Orders\CardType.CS" />
|
||||
<Compile Include="Models\Orders\Order.cs" />
|
||||
@ -95,6 +97,9 @@
|
||||
<Compile Include="Services\Identity\IIdentityService.cs" />
|
||||
<Compile Include="Services\Location\ILocationService.cs" />
|
||||
<Compile Include="Services\Location\LocationService.cs" />
|
||||
<Compile Include="Services\Marketing\ICampaignService.cs" />
|
||||
<Compile Include="Services\Marketing\CampaignMockService.cs" />
|
||||
<Compile Include="Services\Marketing\CampaignService.cs" />
|
||||
<Compile Include="Services\Navigation\INavigationService.cs" />
|
||||
<Compile Include="Services\Navigation\NavigationService.cs" />
|
||||
<Compile Include="Services\OpenUrl\IOpenUrlService.cs" />
|
||||
@ -117,6 +122,8 @@
|
||||
<Compile Include="ViewModels\Base\ViewModelBase.cs" />
|
||||
<Compile Include="ViewModels\Base\ViewModelLocator.cs" />
|
||||
<Compile Include="ViewModels\BasketViewModel.cs" />
|
||||
<Compile Include="ViewModels\CampaignDetailsViewModel.cs" />
|
||||
<Compile Include="ViewModels\CampaignViewModel.cs" />
|
||||
<Compile Include="ViewModels\CatalogViewModel.cs" />
|
||||
<Compile Include="ViewModels\CheckoutViewModel.cs" />
|
||||
<Compile Include="ViewModels\LoginViewModel.cs" />
|
||||
@ -127,9 +134,15 @@
|
||||
<Compile Include="Views\BasketView.xaml.cs">
|
||||
<DependentUpon>BasketView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\CampaignView.xaml.cs">
|
||||
<DependentUpon>CampaignView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\CatalogView.xaml.cs">
|
||||
<DependentUpon>CatalogView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\CampaignDetailsView.xaml.cs">
|
||||
<DependentUpon>CampaignDetailsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\CheckoutView.xaml.cs">
|
||||
<DependentUpon>CheckoutView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -163,6 +176,9 @@
|
||||
<Compile Include="Views\Templates\OrderTemplate.xaml.cs">
|
||||
<DependentUpon>OrderTemplate.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Templates\CampaignTemplate.xaml.cs">
|
||||
<DependentUpon>CampaignTemplate.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Templates\ProductTemplate.xaml.cs">
|
||||
<DependentUpon>ProductTemplate.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -265,13 +281,28 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\Token\" />
|
||||
<EmbeddedResource Include="Views\CampaignView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.ComponentModel.Annotations">
|
||||
<HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.6\Profile\Profile44\System.ComponentModel.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Views\CampaignDetailsView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Views\Templates\CampaignTemplate.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
@ -1,15 +1,15 @@
|
||||
#pragma warning disable 1591
|
||||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
[assembly: Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.Droid.Resource", IsApplication=true)]
|
||||
[assembly: global::Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.Droid.Resource", IsApplication=true)]
|
||||
|
||||
namespace eShopOnContainers.Droid
|
||||
{
|
||||
@ -2030,322 +2030,331 @@ namespace eShopOnContainers.Droid
|
||||
public const int banner = 2130837581;
|
||||
|
||||
// aapt resource value: 0x7f02004e
|
||||
public const int default_product = 2130837582;
|
||||
public const int default_campaign = 2130837582;
|
||||
|
||||
// aapt resource value: 0x7f02004f
|
||||
public const int design_fab_background = 2130837583;
|
||||
public const int default_product = 2130837583;
|
||||
|
||||
// aapt resource value: 0x7f020050
|
||||
public const int design_snackbar_background = 2130837584;
|
||||
public const int design_fab_background = 2130837584;
|
||||
|
||||
// aapt resource value: 0x7f020051
|
||||
public const int fake_product_01 = 2130837585;
|
||||
public const int design_snackbar_background = 2130837585;
|
||||
|
||||
// aapt resource value: 0x7f020052
|
||||
public const int fake_product_02 = 2130837586;
|
||||
public const int fake_campaign_01 = 2130837586;
|
||||
|
||||
// aapt resource value: 0x7f020053
|
||||
public const int fake_product_03 = 2130837587;
|
||||
public const int fake_campaign_02 = 2130837587;
|
||||
|
||||
// aapt resource value: 0x7f020054
|
||||
public const int fake_product_04 = 2130837588;
|
||||
public const int fake_product_01 = 2130837588;
|
||||
|
||||
// aapt resource value: 0x7f020055
|
||||
public const int fake_product_05 = 2130837589;
|
||||
public const int fake_product_02 = 2130837589;
|
||||
|
||||
// aapt resource value: 0x7f020056
|
||||
public const int header_logo = 2130837590;
|
||||
public const int fake_product_03 = 2130837590;
|
||||
|
||||
// aapt resource value: 0x7f020057
|
||||
public const int ic_audiotrack = 2130837591;
|
||||
public const int fake_product_04 = 2130837591;
|
||||
|
||||
// aapt resource value: 0x7f020058
|
||||
public const int ic_audiotrack_light = 2130837592;
|
||||
public const int fake_product_05 = 2130837592;
|
||||
|
||||
// aapt resource value: 0x7f020059
|
||||
public const int ic_bluetooth_grey = 2130837593;
|
||||
public const int header_logo = 2130837593;
|
||||
|
||||
// aapt resource value: 0x7f02005a
|
||||
public const int ic_bluetooth_white = 2130837594;
|
||||
public const int ic_audiotrack = 2130837594;
|
||||
|
||||
// aapt resource value: 0x7f02005b
|
||||
public const int ic_cast_dark = 2130837595;
|
||||
public const int ic_audiotrack_light = 2130837595;
|
||||
|
||||
// aapt resource value: 0x7f02005c
|
||||
public const int ic_cast_disabled_light = 2130837596;
|
||||
public const int ic_bluetooth_grey = 2130837596;
|
||||
|
||||
// aapt resource value: 0x7f02005d
|
||||
public const int ic_cast_grey = 2130837597;
|
||||
public const int ic_bluetooth_white = 2130837597;
|
||||
|
||||
// aapt resource value: 0x7f02005e
|
||||
public const int ic_cast_light = 2130837598;
|
||||
public const int ic_cast_dark = 2130837598;
|
||||
|
||||
// aapt resource value: 0x7f02005f
|
||||
public const int ic_cast_off_light = 2130837599;
|
||||
public const int ic_cast_disabled_light = 2130837599;
|
||||
|
||||
// aapt resource value: 0x7f020060
|
||||
public const int ic_cast_on_0_light = 2130837600;
|
||||
public const int ic_cast_grey = 2130837600;
|
||||
|
||||
// aapt resource value: 0x7f020061
|
||||
public const int ic_cast_on_1_light = 2130837601;
|
||||
public const int ic_cast_light = 2130837601;
|
||||
|
||||
// aapt resource value: 0x7f020062
|
||||
public const int ic_cast_on_2_light = 2130837602;
|
||||
public const int ic_cast_off_light = 2130837602;
|
||||
|
||||
// aapt resource value: 0x7f020063
|
||||
public const int ic_cast_on_light = 2130837603;
|
||||
public const int ic_cast_on_0_light = 2130837603;
|
||||
|
||||
// aapt resource value: 0x7f020064
|
||||
public const int ic_cast_white = 2130837604;
|
||||
public const int ic_cast_on_1_light = 2130837604;
|
||||
|
||||
// aapt resource value: 0x7f020065
|
||||
public const int ic_close_dark = 2130837605;
|
||||
public const int ic_cast_on_2_light = 2130837605;
|
||||
|
||||
// aapt resource value: 0x7f020066
|
||||
public const int ic_close_light = 2130837606;
|
||||
public const int ic_cast_on_light = 2130837606;
|
||||
|
||||
// aapt resource value: 0x7f020067
|
||||
public const int ic_collapse = 2130837607;
|
||||
public const int ic_cast_white = 2130837607;
|
||||
|
||||
// aapt resource value: 0x7f020068
|
||||
public const int ic_collapse_00000 = 2130837608;
|
||||
public const int ic_close_dark = 2130837608;
|
||||
|
||||
// aapt resource value: 0x7f020069
|
||||
public const int ic_collapse_00001 = 2130837609;
|
||||
public const int ic_close_light = 2130837609;
|
||||
|
||||
// aapt resource value: 0x7f02006a
|
||||
public const int ic_collapse_00002 = 2130837610;
|
||||
public const int ic_collapse = 2130837610;
|
||||
|
||||
// aapt resource value: 0x7f02006b
|
||||
public const int ic_collapse_00003 = 2130837611;
|
||||
public const int ic_collapse_00000 = 2130837611;
|
||||
|
||||
// aapt resource value: 0x7f02006c
|
||||
public const int ic_collapse_00004 = 2130837612;
|
||||
public const int ic_collapse_00001 = 2130837612;
|
||||
|
||||
// aapt resource value: 0x7f02006d
|
||||
public const int ic_collapse_00005 = 2130837613;
|
||||
public const int ic_collapse_00002 = 2130837613;
|
||||
|
||||
// aapt resource value: 0x7f02006e
|
||||
public const int ic_collapse_00006 = 2130837614;
|
||||
public const int ic_collapse_00003 = 2130837614;
|
||||
|
||||
// aapt resource value: 0x7f02006f
|
||||
public const int ic_collapse_00007 = 2130837615;
|
||||
public const int ic_collapse_00004 = 2130837615;
|
||||
|
||||
// aapt resource value: 0x7f020070
|
||||
public const int ic_collapse_00008 = 2130837616;
|
||||
public const int ic_collapse_00005 = 2130837616;
|
||||
|
||||
// aapt resource value: 0x7f020071
|
||||
public const int ic_collapse_00009 = 2130837617;
|
||||
public const int ic_collapse_00006 = 2130837617;
|
||||
|
||||
// aapt resource value: 0x7f020072
|
||||
public const int ic_collapse_00010 = 2130837618;
|
||||
public const int ic_collapse_00007 = 2130837618;
|
||||
|
||||
// aapt resource value: 0x7f020073
|
||||
public const int ic_collapse_00011 = 2130837619;
|
||||
public const int ic_collapse_00008 = 2130837619;
|
||||
|
||||
// aapt resource value: 0x7f020074
|
||||
public const int ic_collapse_00012 = 2130837620;
|
||||
public const int ic_collapse_00009 = 2130837620;
|
||||
|
||||
// aapt resource value: 0x7f020075
|
||||
public const int ic_collapse_00013 = 2130837621;
|
||||
public const int ic_collapse_00010 = 2130837621;
|
||||
|
||||
// aapt resource value: 0x7f020076
|
||||
public const int ic_collapse_00014 = 2130837622;
|
||||
public const int ic_collapse_00011 = 2130837622;
|
||||
|
||||
// aapt resource value: 0x7f020077
|
||||
public const int ic_collapse_00015 = 2130837623;
|
||||
public const int ic_collapse_00012 = 2130837623;
|
||||
|
||||
// aapt resource value: 0x7f020078
|
||||
public const int ic_errorstatus = 2130837624;
|
||||
public const int ic_collapse_00013 = 2130837624;
|
||||
|
||||
// aapt resource value: 0x7f020079
|
||||
public const int ic_expand = 2130837625;
|
||||
public const int ic_collapse_00014 = 2130837625;
|
||||
|
||||
// aapt resource value: 0x7f02007a
|
||||
public const int ic_expand_00000 = 2130837626;
|
||||
public const int ic_collapse_00015 = 2130837626;
|
||||
|
||||
// aapt resource value: 0x7f02007b
|
||||
public const int ic_expand_00001 = 2130837627;
|
||||
public const int ic_errorstatus = 2130837627;
|
||||
|
||||
// aapt resource value: 0x7f02007c
|
||||
public const int ic_expand_00002 = 2130837628;
|
||||
public const int ic_expand = 2130837628;
|
||||
|
||||
// aapt resource value: 0x7f02007d
|
||||
public const int ic_expand_00003 = 2130837629;
|
||||
public const int ic_expand_00000 = 2130837629;
|
||||
|
||||
// aapt resource value: 0x7f02007e
|
||||
public const int ic_expand_00004 = 2130837630;
|
||||
public const int ic_expand_00001 = 2130837630;
|
||||
|
||||
// aapt resource value: 0x7f02007f
|
||||
public const int ic_expand_00005 = 2130837631;
|
||||
public const int ic_expand_00002 = 2130837631;
|
||||
|
||||
// aapt resource value: 0x7f020080
|
||||
public const int ic_expand_00006 = 2130837632;
|
||||
public const int ic_expand_00003 = 2130837632;
|
||||
|
||||
// aapt resource value: 0x7f020081
|
||||
public const int ic_expand_00007 = 2130837633;
|
||||
public const int ic_expand_00004 = 2130837633;
|
||||
|
||||
// aapt resource value: 0x7f020082
|
||||
public const int ic_expand_00008 = 2130837634;
|
||||
public const int ic_expand_00005 = 2130837634;
|
||||
|
||||
// aapt resource value: 0x7f020083
|
||||
public const int ic_expand_00009 = 2130837635;
|
||||
public const int ic_expand_00006 = 2130837635;
|
||||
|
||||
// aapt resource value: 0x7f020084
|
||||
public const int ic_expand_00010 = 2130837636;
|
||||
public const int ic_expand_00007 = 2130837636;
|
||||
|
||||
// aapt resource value: 0x7f020085
|
||||
public const int ic_expand_00011 = 2130837637;
|
||||
public const int ic_expand_00008 = 2130837637;
|
||||
|
||||
// aapt resource value: 0x7f020086
|
||||
public const int ic_expand_00012 = 2130837638;
|
||||
public const int ic_expand_00009 = 2130837638;
|
||||
|
||||
// aapt resource value: 0x7f020087
|
||||
public const int ic_expand_00013 = 2130837639;
|
||||
public const int ic_expand_00010 = 2130837639;
|
||||
|
||||
// aapt resource value: 0x7f020088
|
||||
public const int ic_expand_00014 = 2130837640;
|
||||
public const int ic_expand_00011 = 2130837640;
|
||||
|
||||
// aapt resource value: 0x7f020089
|
||||
public const int ic_expand_00015 = 2130837641;
|
||||
public const int ic_expand_00012 = 2130837641;
|
||||
|
||||
// aapt resource value: 0x7f02008a
|
||||
public const int ic_media_pause = 2130837642;
|
||||
public const int ic_expand_00013 = 2130837642;
|
||||
|
||||
// aapt resource value: 0x7f02008b
|
||||
public const int ic_media_play = 2130837643;
|
||||
public const int ic_expand_00014 = 2130837643;
|
||||
|
||||
// aapt resource value: 0x7f02008c
|
||||
public const int ic_media_route_disabled_mono_dark = 2130837644;
|
||||
public const int ic_expand_00015 = 2130837644;
|
||||
|
||||
// aapt resource value: 0x7f02008d
|
||||
public const int ic_media_route_off_mono_dark = 2130837645;
|
||||
public const int ic_media_pause = 2130837645;
|
||||
|
||||
// aapt resource value: 0x7f02008e
|
||||
public const int ic_media_route_on_0_mono_dark = 2130837646;
|
||||
public const int ic_media_play = 2130837646;
|
||||
|
||||
// aapt resource value: 0x7f02008f
|
||||
public const int ic_media_route_on_1_mono_dark = 2130837647;
|
||||
public const int ic_media_route_disabled_mono_dark = 2130837647;
|
||||
|
||||
// aapt resource value: 0x7f020090
|
||||
public const int ic_media_route_on_2_mono_dark = 2130837648;
|
||||
public const int ic_media_route_off_mono_dark = 2130837648;
|
||||
|
||||
// aapt resource value: 0x7f020091
|
||||
public const int ic_media_route_on_mono_dark = 2130837649;
|
||||
public const int ic_media_route_on_0_mono_dark = 2130837649;
|
||||
|
||||
// aapt resource value: 0x7f020092
|
||||
public const int ic_pause_dark = 2130837650;
|
||||
public const int ic_media_route_on_1_mono_dark = 2130837650;
|
||||
|
||||
// aapt resource value: 0x7f020093
|
||||
public const int ic_pause_light = 2130837651;
|
||||
public const int ic_media_route_on_2_mono_dark = 2130837651;
|
||||
|
||||
// aapt resource value: 0x7f020094
|
||||
public const int ic_play_dark = 2130837652;
|
||||
public const int ic_media_route_on_mono_dark = 2130837652;
|
||||
|
||||
// aapt resource value: 0x7f020095
|
||||
public const int ic_play_light = 2130837653;
|
||||
public const int ic_pause_dark = 2130837653;
|
||||
|
||||
// aapt resource value: 0x7f020096
|
||||
public const int ic_speaker_dark = 2130837654;
|
||||
public const int ic_pause_light = 2130837654;
|
||||
|
||||
// aapt resource value: 0x7f020097
|
||||
public const int ic_speaker_group_dark = 2130837655;
|
||||
public const int ic_play_dark = 2130837655;
|
||||
|
||||
// aapt resource value: 0x7f020098
|
||||
public const int ic_speaker_group_light = 2130837656;
|
||||
public const int ic_play_light = 2130837656;
|
||||
|
||||
// aapt resource value: 0x7f020099
|
||||
public const int ic_speaker_light = 2130837657;
|
||||
public const int ic_speaker_dark = 2130837657;
|
||||
|
||||
// aapt resource value: 0x7f02009a
|
||||
public const int ic_successstatus = 2130837658;
|
||||
public const int ic_speaker_group_dark = 2130837658;
|
||||
|
||||
// aapt resource value: 0x7f02009b
|
||||
public const int ic_tv_dark = 2130837659;
|
||||
public const int ic_speaker_group_light = 2130837659;
|
||||
|
||||
// aapt resource value: 0x7f02009c
|
||||
public const int ic_tv_light = 2130837660;
|
||||
public const int ic_speaker_light = 2130837660;
|
||||
|
||||
// aapt resource value: 0x7f02009d
|
||||
public const int icon = 2130837661;
|
||||
public const int ic_successstatus = 2130837661;
|
||||
|
||||
// aapt resource value: 0x7f02009e
|
||||
public const int menu_cart = 2130837662;
|
||||
public const int ic_tv_dark = 2130837662;
|
||||
|
||||
// aapt resource value: 0x7f02009f
|
||||
public const int menu_filter = 2130837663;
|
||||
public const int ic_tv_light = 2130837663;
|
||||
|
||||
// aapt resource value: 0x7f0200a0
|
||||
public const int menu_profile = 2130837664;
|
||||
public const int icon = 2130837664;
|
||||
|
||||
// aapt resource value: 0x7f0200a1
|
||||
public const int mr_dialog_material_background_dark = 2130837665;
|
||||
public const int menu_cart = 2130837665;
|
||||
|
||||
// aapt resource value: 0x7f0200a2
|
||||
public const int mr_dialog_material_background_light = 2130837666;
|
||||
public const int menu_filter = 2130837666;
|
||||
|
||||
// aapt resource value: 0x7f0200a3
|
||||
public const int mr_ic_audiotrack_light = 2130837667;
|
||||
public const int menu_profile = 2130837667;
|
||||
|
||||
// aapt resource value: 0x7f0200a4
|
||||
public const int mr_ic_cast_dark = 2130837668;
|
||||
public const int mr_dialog_material_background_dark = 2130837668;
|
||||
|
||||
// aapt resource value: 0x7f0200a5
|
||||
public const int mr_ic_cast_light = 2130837669;
|
||||
public const int mr_dialog_material_background_light = 2130837669;
|
||||
|
||||
// aapt resource value: 0x7f0200a6
|
||||
public const int mr_ic_close_dark = 2130837670;
|
||||
public const int mr_ic_audiotrack_light = 2130837670;
|
||||
|
||||
// aapt resource value: 0x7f0200a7
|
||||
public const int mr_ic_close_light = 2130837671;
|
||||
public const int mr_ic_cast_dark = 2130837671;
|
||||
|
||||
// aapt resource value: 0x7f0200a8
|
||||
public const int mr_ic_media_route_connecting_mono_dark = 2130837672;
|
||||
public const int mr_ic_cast_light = 2130837672;
|
||||
|
||||
// aapt resource value: 0x7f0200a9
|
||||
public const int mr_ic_media_route_connecting_mono_light = 2130837673;
|
||||
public const int mr_ic_close_dark = 2130837673;
|
||||
|
||||
// aapt resource value: 0x7f0200aa
|
||||
public const int mr_ic_media_route_mono_dark = 2130837674;
|
||||
public const int mr_ic_close_light = 2130837674;
|
||||
|
||||
// aapt resource value: 0x7f0200ab
|
||||
public const int mr_ic_media_route_mono_light = 2130837675;
|
||||
public const int mr_ic_media_route_connecting_mono_dark = 2130837675;
|
||||
|
||||
// aapt resource value: 0x7f0200ac
|
||||
public const int mr_ic_pause_dark = 2130837676;
|
||||
public const int mr_ic_media_route_connecting_mono_light = 2130837676;
|
||||
|
||||
// aapt resource value: 0x7f0200ad
|
||||
public const int mr_ic_pause_light = 2130837677;
|
||||
public const int mr_ic_media_route_mono_dark = 2130837677;
|
||||
|
||||
// aapt resource value: 0x7f0200ae
|
||||
public const int mr_ic_play_dark = 2130837678;
|
||||
public const int mr_ic_media_route_mono_light = 2130837678;
|
||||
|
||||
// aapt resource value: 0x7f0200af
|
||||
public const int mr_ic_play_light = 2130837679;
|
||||
public const int mr_ic_pause_dark = 2130837679;
|
||||
|
||||
// aapt resource value: 0x7f0200b0
|
||||
public const int noimage = 2130837680;
|
||||
|
||||
// aapt resource value: 0x7f0200b7
|
||||
public const int notification_template_icon_bg = 2130837687;
|
||||
public const int mr_ic_pause_light = 2130837680;
|
||||
|
||||
// aapt resource value: 0x7f0200b1
|
||||
public const int product_add = 2130837681;
|
||||
public const int mr_ic_play_dark = 2130837681;
|
||||
|
||||
// aapt resource value: 0x7f0200b2
|
||||
public const int roundedbg = 2130837682;
|
||||
public const int mr_ic_play_light = 2130837682;
|
||||
|
||||
// aapt resource value: 0x7f0200b3
|
||||
public const int roundedbgdark = 2130837683;
|
||||
public const int noimage = 2130837683;
|
||||
|
||||
// aapt resource value: 0x7f0200ba
|
||||
public const int notification_template_icon_bg = 2130837690;
|
||||
|
||||
// aapt resource value: 0x7f0200b4
|
||||
public const int splash_drawable = 2130837684;
|
||||
public const int product_add = 2130837684;
|
||||
|
||||
// aapt resource value: 0x7f0200b5
|
||||
public const int switch_off = 2130837685;
|
||||
public const int roundedbg = 2130837685;
|
||||
|
||||
// aapt resource value: 0x7f0200b6
|
||||
public const int switch_on = 2130837686;
|
||||
public const int roundedbgdark = 2130837686;
|
||||
|
||||
// aapt resource value: 0x7f0200b7
|
||||
public const int splash_drawable = 2130837687;
|
||||
|
||||
// aapt resource value: 0x7f0200b8
|
||||
public const int switch_off = 2130837688;
|
||||
|
||||
// aapt resource value: 0x7f0200b9
|
||||
public const int switch_on = 2130837689;
|
||||
|
||||
static Drawable()
|
||||
{
|
||||
@ -4388,8 +4397,7 @@ namespace eShopOnContainers.Droid
|
||||
public partial class Styleable
|
||||
{
|
||||
|
||||
public static int[] ActionBar = new int[]
|
||||
{
|
||||
public static int[] ActionBar = new int[] {
|
||||
2130772007,
|
||||
2130772009,
|
||||
2130772010,
|
||||
@ -4499,15 +4507,13 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 5
|
||||
public const int ActionBar_titleTextStyle = 5;
|
||||
|
||||
public static int[] ActionBarLayout = new int[]
|
||||
{
|
||||
public static int[] ActionBarLayout = new int[] {
|
||||
16842931};
|
||||
|
||||
// aapt resource value: 0
|
||||
public const int ActionBarLayout_android_layout_gravity = 0;
|
||||
|
||||
public static int[] ActionMenuItemView = new int[]
|
||||
{
|
||||
public static int[] ActionMenuItemView = new int[] {
|
||||
16843071};
|
||||
|
||||
// aapt resource value: 0
|
||||
@ -4515,8 +4521,7 @@ namespace eShopOnContainers.Droid
|
||||
|
||||
public static int[] ActionMenuView;
|
||||
|
||||
public static int[] ActionMode = new int[]
|
||||
{
|
||||
public static int[] ActionMode = new int[] {
|
||||
2130772007,
|
||||
2130772013,
|
||||
2130772014,
|
||||
@ -4542,8 +4547,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int ActionMode_titleTextStyle = 1;
|
||||
|
||||
public static int[] ActivityChooserView = new int[]
|
||||
{
|
||||
public static int[] ActivityChooserView = new int[] {
|
||||
2130772035,
|
||||
2130772036};
|
||||
|
||||
@ -4553,8 +4557,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 0
|
||||
public const int ActivityChooserView_initialActivityCount = 0;
|
||||
|
||||
public static int[] AlertDialog = new int[]
|
||||
{
|
||||
public static int[] AlertDialog = new int[] {
|
||||
16842994,
|
||||
2130772037,
|
||||
2130772038,
|
||||
@ -4580,8 +4583,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 4
|
||||
public const int AlertDialog_singleChoiceItemLayout = 4;
|
||||
|
||||
public static int[] AppBarLayout = new int[]
|
||||
{
|
||||
public static int[] AppBarLayout = new int[] {
|
||||
16842964,
|
||||
2130772032,
|
||||
2130772215};
|
||||
@ -4595,8 +4597,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int AppBarLayout_expanded = 2;
|
||||
|
||||
public static int[] AppBarLayout_LayoutParams = new int[]
|
||||
{
|
||||
public static int[] AppBarLayout_LayoutParams = new int[] {
|
||||
2130772216,
|
||||
2130772217};
|
||||
|
||||
@ -4606,8 +4607,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1;
|
||||
|
||||
public static int[] AppCompatImageView = new int[]
|
||||
{
|
||||
public static int[] AppCompatImageView = new int[] {
|
||||
16843033,
|
||||
2130772042};
|
||||
|
||||
@ -4617,8 +4617,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int AppCompatImageView_srcCompat = 1;
|
||||
|
||||
public static int[] AppCompatTextView = new int[]
|
||||
{
|
||||
public static int[] AppCompatTextView = new int[] {
|
||||
16842804,
|
||||
2130772043};
|
||||
|
||||
@ -4628,8 +4627,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int AppCompatTextView_textAllCaps = 1;
|
||||
|
||||
public static int[] AppCompatTheme = new int[]
|
||||
{
|
||||
public static int[] AppCompatTheme = new int[] {
|
||||
16842839,
|
||||
16842926,
|
||||
2130772044,
|
||||
@ -5079,8 +5077,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 3
|
||||
public const int AppCompatTheme_windowNoTitle = 3;
|
||||
|
||||
public static int[] BottomSheetBehavior_Params = new int[]
|
||||
{
|
||||
public static int[] BottomSheetBehavior_Params = new int[] {
|
||||
2130772218,
|
||||
2130772219};
|
||||
|
||||
@ -5090,15 +5087,13 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 0
|
||||
public const int BottomSheetBehavior_Params_behavior_peekHeight = 0;
|
||||
|
||||
public static int[] ButtonBarLayout = new int[]
|
||||
{
|
||||
public static int[] ButtonBarLayout = new int[] {
|
||||
2130772154};
|
||||
|
||||
// aapt resource value: 0
|
||||
public const int ButtonBarLayout_allowStacking = 0;
|
||||
|
||||
public static int[] CardView = new int[]
|
||||
{
|
||||
public static int[] CardView = new int[] {
|
||||
16843071,
|
||||
16843072,
|
||||
2130771995,
|
||||
@ -5152,8 +5147,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 11
|
||||
public const int CardView_contentPaddingTop = 11;
|
||||
|
||||
public static int[] CollapsingAppBarLayout_LayoutParams = new int[]
|
||||
{
|
||||
public static int[] CollapsingAppBarLayout_LayoutParams = new int[] {
|
||||
2130772220,
|
||||
2130772221};
|
||||
|
||||
@ -5163,8 +5157,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1;
|
||||
|
||||
public static int[] CollapsingToolbarLayout = new int[]
|
||||
{
|
||||
public static int[] CollapsingToolbarLayout = new int[] {
|
||||
2130772009,
|
||||
2130772222,
|
||||
2130772223,
|
||||
@ -5222,8 +5215,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 10
|
||||
public const int CollapsingToolbarLayout_toolbarId = 10;
|
||||
|
||||
public static int[] CompoundButton = new int[]
|
||||
{
|
||||
public static int[] CompoundButton = new int[] {
|
||||
16843015,
|
||||
2130772155,
|
||||
2130772156};
|
||||
@ -5237,8 +5229,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int CompoundButton_buttonTintMode = 2;
|
||||
|
||||
public static int[] CoordinatorLayout = new int[]
|
||||
{
|
||||
public static int[] CoordinatorLayout = new int[] {
|
||||
2130772235,
|
||||
2130772236};
|
||||
|
||||
@ -5248,8 +5239,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int CoordinatorLayout_statusBarBackground = 1;
|
||||
|
||||
public static int[] CoordinatorLayout_LayoutParams = new int[]
|
||||
{
|
||||
public static int[] CoordinatorLayout_LayoutParams = new int[] {
|
||||
16842931,
|
||||
2130772237,
|
||||
2130772238,
|
||||
@ -5271,8 +5261,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 3
|
||||
public const int CoordinatorLayout_LayoutParams_layout_keyline = 3;
|
||||
|
||||
public static int[] DesignTheme = new int[]
|
||||
{
|
||||
public static int[] DesignTheme = new int[] {
|
||||
2130772241,
|
||||
2130772242,
|
||||
2130772243};
|
||||
@ -5286,8 +5275,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int DesignTheme_textColorError = 2;
|
||||
|
||||
public static int[] DrawerArrowToggle = new int[]
|
||||
{
|
||||
public static int[] DrawerArrowToggle = new int[] {
|
||||
2130772157,
|
||||
2130772158,
|
||||
2130772159,
|
||||
@ -5321,8 +5309,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 7
|
||||
public const int DrawerArrowToggle_thickness = 7;
|
||||
|
||||
public static int[] FloatingActionButton = new int[]
|
||||
{
|
||||
public static int[] FloatingActionButton = new int[] {
|
||||
2130772032,
|
||||
2130772213,
|
||||
2130772214,
|
||||
@ -5356,8 +5343,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 7
|
||||
public const int FloatingActionButton_useCompatPadding = 7;
|
||||
|
||||
public static int[] ForegroundLinearLayout = new int[]
|
||||
{
|
||||
public static int[] ForegroundLinearLayout = new int[] {
|
||||
16843017,
|
||||
16843264,
|
||||
2130772249};
|
||||
@ -5371,8 +5357,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int ForegroundLinearLayout_foregroundInsidePadding = 2;
|
||||
|
||||
public static int[] LinearLayoutCompat = new int[]
|
||||
{
|
||||
public static int[] LinearLayoutCompat = new int[] {
|
||||
16842927,
|
||||
16842948,
|
||||
16843046,
|
||||
@ -5410,8 +5395,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 7
|
||||
public const int LinearLayoutCompat_showDividers = 7;
|
||||
|
||||
public static int[] LinearLayoutCompat_Layout = new int[]
|
||||
{
|
||||
public static int[] LinearLayoutCompat_Layout = new int[] {
|
||||
16842931,
|
||||
16842996,
|
||||
16842997,
|
||||
@ -5429,8 +5413,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int LinearLayoutCompat_Layout_android_layout_width = 1;
|
||||
|
||||
public static int[] ListPopupWindow = new int[]
|
||||
{
|
||||
public static int[] ListPopupWindow = new int[] {
|
||||
16843436,
|
||||
16843437};
|
||||
|
||||
@ -5440,8 +5423,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int ListPopupWindow_android_dropDownVerticalOffset = 1;
|
||||
|
||||
public static int[] MediaRouteButton = new int[]
|
||||
{
|
||||
public static int[] MediaRouteButton = new int[] {
|
||||
16843071,
|
||||
16843072,
|
||||
2130771994};
|
||||
@ -5455,8 +5437,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int MediaRouteButton_externalRouteEnabledDrawable = 2;
|
||||
|
||||
public static int[] MenuGroup = new int[]
|
||||
{
|
||||
public static int[] MenuGroup = new int[] {
|
||||
16842766,
|
||||
16842960,
|
||||
16843156,
|
||||
@ -5482,8 +5463,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int MenuGroup_android_visible = 2;
|
||||
|
||||
public static int[] MenuItem = new int[]
|
||||
{
|
||||
public static int[] MenuItem = new int[] {
|
||||
16842754,
|
||||
16842766,
|
||||
16842960,
|
||||
@ -5553,8 +5533,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 13
|
||||
public const int MenuItem_showAsAction = 13;
|
||||
|
||||
public static int[] MenuView = new int[]
|
||||
{
|
||||
public static int[] MenuView = new int[] {
|
||||
16842926,
|
||||
16843052,
|
||||
16843053,
|
||||
@ -5588,8 +5567,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 7
|
||||
public const int MenuView_preserveIconSpacing = 7;
|
||||
|
||||
public static int[] NavigationView = new int[]
|
||||
{
|
||||
public static int[] NavigationView = new int[] {
|
||||
16842964,
|
||||
16842973,
|
||||
16843039,
|
||||
@ -5631,8 +5609,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 4
|
||||
public const int NavigationView_menu = 4;
|
||||
|
||||
public static int[] PopupWindow = new int[]
|
||||
{
|
||||
public static int[] PopupWindow = new int[] {
|
||||
16843126,
|
||||
2130772173};
|
||||
|
||||
@ -5642,15 +5619,13 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 1
|
||||
public const int PopupWindow_overlapAnchor = 1;
|
||||
|
||||
public static int[] PopupWindowBackgroundState = new int[]
|
||||
{
|
||||
public static int[] PopupWindowBackgroundState = new int[] {
|
||||
2130772174};
|
||||
|
||||
// aapt resource value: 0
|
||||
public const int PopupWindowBackgroundState_state_above_anchor = 0;
|
||||
|
||||
public static int[] ProgressWheel = new int[]
|
||||
{
|
||||
public static int[] ProgressWheel = new int[] {
|
||||
2130772284,
|
||||
2130772285,
|
||||
2130772286,
|
||||
@ -5700,8 +5675,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int ProgressWheel_ahTextSize = 2;
|
||||
|
||||
public static int[] RecyclerView = new int[]
|
||||
{
|
||||
public static int[] RecyclerView = new int[] {
|
||||
16842948,
|
||||
2130771968,
|
||||
2130771969,
|
||||
@ -5723,22 +5697,19 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 4
|
||||
public const int RecyclerView_stackFromEnd = 4;
|
||||
|
||||
public static int[] ScrimInsetsFrameLayout = new int[]
|
||||
{
|
||||
public static int[] ScrimInsetsFrameLayout = new int[] {
|
||||
2130772256};
|
||||
|
||||
// aapt resource value: 0
|
||||
public const int ScrimInsetsFrameLayout_insetForeground = 0;
|
||||
|
||||
public static int[] ScrollingViewBehavior_Params = new int[]
|
||||
{
|
||||
public static int[] ScrollingViewBehavior_Params = new int[] {
|
||||
2130772257};
|
||||
|
||||
// aapt resource value: 0
|
||||
public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0;
|
||||
|
||||
public static int[] SearchView = new int[]
|
||||
{
|
||||
public static int[] SearchView = new int[] {
|
||||
16842970,
|
||||
16843039,
|
||||
16843296,
|
||||
@ -5808,8 +5779,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 12
|
||||
public const int SearchView_voiceIcon = 12;
|
||||
|
||||
public static int[] SnackbarLayout = new int[]
|
||||
{
|
||||
public static int[] SnackbarLayout = new int[] {
|
||||
16843039,
|
||||
2130772032,
|
||||
2130772258};
|
||||
@ -5823,8 +5793,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int SnackbarLayout_maxActionInlineWidth = 2;
|
||||
|
||||
public static int[] Spinner = new int[]
|
||||
{
|
||||
public static int[] Spinner = new int[] {
|
||||
16842930,
|
||||
16843126,
|
||||
16843131,
|
||||
@ -5846,8 +5815,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 4
|
||||
public const int Spinner_popupTheme = 4;
|
||||
|
||||
public static int[] SwitchCompat = new int[]
|
||||
{
|
||||
public static int[] SwitchCompat = new int[] {
|
||||
16843044,
|
||||
16843045,
|
||||
16843074,
|
||||
@ -5889,8 +5857,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 3
|
||||
public const int SwitchCompat_track = 3;
|
||||
|
||||
public static int[] TabItem = new int[]
|
||||
{
|
||||
public static int[] TabItem = new int[] {
|
||||
16842754,
|
||||
16842994,
|
||||
16843087};
|
||||
@ -5904,8 +5871,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int TabItem_android_text = 2;
|
||||
|
||||
public static int[] TabLayout = new int[]
|
||||
{
|
||||
public static int[] TabLayout = new int[] {
|
||||
2130772259,
|
||||
2130772260,
|
||||
2130772261,
|
||||
@ -5971,8 +5937,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 9
|
||||
public const int TabLayout_tabTextColor = 9;
|
||||
|
||||
public static int[] TextAppearance = new int[]
|
||||
{
|
||||
public static int[] TextAppearance = new int[] {
|
||||
16842901,
|
||||
16842902,
|
||||
16842903,
|
||||
@ -6010,8 +5975,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 8
|
||||
public const int TextAppearance_textAllCaps = 8;
|
||||
|
||||
public static int[] TextInputLayout = new int[]
|
||||
{
|
||||
public static int[] TextInputLayout = new int[] {
|
||||
16842906,
|
||||
16843088,
|
||||
2130772275,
|
||||
@ -6057,8 +6021,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int TextInputLayout_hintTextAppearance = 2;
|
||||
|
||||
public static int[] Toolbar = new int[]
|
||||
{
|
||||
public static int[] Toolbar = new int[] {
|
||||
16842927,
|
||||
16843072,
|
||||
2130772009,
|
||||
@ -6160,8 +6123,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 23
|
||||
public const int Toolbar_titleTextColor = 23;
|
||||
|
||||
public static int[] View = new int[]
|
||||
{
|
||||
public static int[] View = new int[] {
|
||||
16842752,
|
||||
16842970,
|
||||
2130772210,
|
||||
@ -6183,8 +6145,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 4
|
||||
public const int View_theme = 4;
|
||||
|
||||
public static int[] ViewBackgroundHelper = new int[]
|
||||
{
|
||||
public static int[] ViewBackgroundHelper = new int[] {
|
||||
16842964,
|
||||
2130772213,
|
||||
2130772214};
|
||||
@ -6198,8 +6159,7 @@ namespace eShopOnContainers.Droid
|
||||
// aapt resource value: 2
|
||||
public const int ViewBackgroundHelper_backgroundTintMode = 2;
|
||||
|
||||
public static int[] ViewStubCompat = new int[]
|
||||
{
|
||||
public static int[] ViewStubCompat = new int[] {
|
||||
16842960,
|
||||
16842994,
|
||||
16842995};
|
||||
|
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 166 KiB |
@ -363,6 +363,15 @@
|
||||
<Name>eShopOnContainers.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable\fake_campaign_02.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable\fake_campaign_01.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable\default_campaign.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
@ -374,4 +383,4 @@
|
||||
</Target>
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Forms.2.3.4.231\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Forms.2.3.4.231\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
|
||||
</Project>
|
||||
</Project>
|
@ -0,0 +1,29 @@
|
||||
namespace eShopOnContainers.UnitTests.Services
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
using Core;
|
||||
using Core.Helpers;
|
||||
using Core.Services.Marketing;
|
||||
using Xunit;
|
||||
|
||||
public class MarketingServiceTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task GetFakeCampaigTest()
|
||||
{
|
||||
var campaignMockService = new CampaignMockService();
|
||||
var order = await campaignMockService.GetCampaignByIdAsync(1, GlobalSetting.Instance.AuthToken);
|
||||
|
||||
Assert.NotNull(order);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetFakeCampaignsTest()
|
||||
{
|
||||
var campaignMockService = new CampaignMockService();
|
||||
var result = await campaignMockService.GetAllCampaignsAsync(Settings.UserId, GlobalSetting.Instance.AuthToken);
|
||||
|
||||
Assert.NotEqual(0, result.Count);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
namespace eShopOnContainers.UnitTests.ViewModels
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Core.ViewModels.Base;
|
||||
using Core.Services.Marketing;
|
||||
using Core.ViewModels;
|
||||
|
||||
public class MarketingViewModelTests
|
||||
{
|
||||
public MarketingViewModelTests()
|
||||
{
|
||||
ViewModelLocator.RegisterDependencies(true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetCampaignsIsNullTest()
|
||||
{
|
||||
var campaignService = new CampaignMockService();
|
||||
var campaignViewModel = new CampaignViewModel(campaignService);
|
||||
Assert.Null(campaignViewModel.Campaigns);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetCampaignsIsNotNullTest()
|
||||
{
|
||||
var campaignService = new CampaignMockService();
|
||||
var campaignViewModel = new CampaignViewModel(campaignService);
|
||||
|
||||
await campaignViewModel.InitializeAsync(null);
|
||||
|
||||
Assert.NotNull(campaignViewModel.Campaigns);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetCampaignDetailsCommandIsNotNullTest()
|
||||
{
|
||||
var campaignService = new CampaignMockService();
|
||||
var campaignViewModel = new CampaignViewModel(campaignService);
|
||||
Assert.NotNull(campaignViewModel.GetCampaignDetailsCommand);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetCampaignDetailsByIdIsNullTest()
|
||||
{
|
||||
var campaignService = new CampaignMockService();
|
||||
var campaignViewModel = new CampaignDetailsViewModel(campaignService);
|
||||
Assert.Null(campaignViewModel.Campaign);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetCampaignDetailsByIdIsNotNullTest()
|
||||
{
|
||||
var campaignService = new CampaignMockService();
|
||||
var campaignDetailsViewModel = new CampaignDetailsViewModel(campaignService);
|
||||
|
||||
await campaignDetailsViewModel.InitializeAsync(1);
|
||||
|
||||
Assert.NotNull(campaignDetailsViewModel.Campaign);
|
||||
}
|
||||
}
|
||||
}
|
@ -38,8 +38,10 @@
|
||||
<Compile Include="Mocks\MockEventToCommandBehavior.cs" />
|
||||
<Compile Include="Services\BasketServiceTests.cs" />
|
||||
<Compile Include="Services\CatalogServiceTests.cs" />
|
||||
<Compile Include="Services\MarketingServiceTests.cs" />
|
||||
<Compile Include="ViewModels\CatalogViewModelTests.cs" />
|
||||
<Compile Include="ViewModels\MainViewModelTests.cs" />
|
||||
<Compile Include="ViewModels\MarketingViewModelTests.cs" />
|
||||
<Compile Include="ViewModels\OrderViewModelTests.cs" />
|
||||
<Compile Include="Services\OrdersServiceTests.cs" />
|
||||
<Compile Include="Behaviors\EventToCommandBehaviorTests.cs" />
|
||||
@ -56,12 +58,7 @@
|
||||
<Name>eShopOnContainers.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Mocks\" />
|
||||
<Folder Include="Services\" />
|
||||
<Folder Include="ViewModels\" />
|
||||
<Folder Include="Behaviors\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 166 KiB |
@ -132,7 +132,10 @@
|
||||
<Content Include="Assets\app_settings.png" />
|
||||
<Content Include="Assets\banner.png" />
|
||||
<Content Include="Assets\circle_button_background.png" />
|
||||
<AndroidResource Include="Assets\default_campaign.png" />
|
||||
<Content Include="Assets\default_product.png" />
|
||||
<Content Include="Assets\fake_campaign_01.png" />
|
||||
<Content Include="Assets\fake_campaign_02.png" />
|
||||
<Content Include="Assets\fake_product_01.png" />
|
||||
<Content Include="Assets\fake_product_02.png" />
|
||||
<Content Include="Assets\fake_product_03.png" />
|
||||
@ -184,4 +187,4 @@
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
</Project>
|
||||
</Project>
|
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 166 KiB |
@ -417,7 +417,15 @@
|
||||
<Name>eShopOnContainers.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_campaign_01.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\fake_campaign_02.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\default_campaign.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
@ -1,3 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Query.Internal;
|
||||
using WebMVC.ViewModels;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||
{
|
||||
using AspNetCore.Authorization;
|
||||
|