/// <summary> /// Initializes a new instance of the <see cref="CategoryTilePage" /> class. /// </summary> public CategoryTilePage(string selectedCategory) { InitializeComponent(); var categoryDataService = App.MockDataService ? TypeLocator.Resolve <ICategoryDataService>() : DataService.TypeLocator.Resolve <ICategoryDataService>(); BindingContext = new CategoryPageViewModel(categoryDataService, selectedCategory); }
/// <summary> /// Initializes a new instance of the <see cref="CartPage" /> class. /// </summary> public CartPage() { InitializeComponent(); var cartDataService = App.MockDataService ? TypeLocator.Resolve <ICartDataService>() : DataService.TypeLocator.Resolve <ICartDataService>(); BindingContext = new CartPageViewModel(cartDataService); }
/// <summary> /// Initializes a new instance of the <see cref="SimpleLoginPage" /> class. /// </summary> public SimpleLoginPage() { InitializeComponent(); var userDataService = App.MockDataService ? TypeLocator.Resolve <IUserDataService>() : DataService.TypeLocator.Resolve <IUserDataService>(); BindingContext = new LoginPageViewModel(userDataService); }
/// <summary> /// Initializes a new instance of the <see cref="CategoryTilePage" /> class. /// </summary> public CategoryTilePageAll() { InitializeComponent(); var categoryDataService = App.MockDataService ? TypeLocator.Resolve <ICategoryDataService>() : TypeLocator.Resolve <ICategoryDataService>(); this.BindingContext = new ViewModels.Catalog.CategoryPageViewModel(GetType().Name, categoryDataService, ""); }
public WishlistPage() { InitializeComponent(); var wishlistDataService = App.MockDataService ? TypeLocator.Resolve <IWishlistDataService>() : DataService.TypeLocator.Resolve <IWishlistDataService>(); var cartDataService = App.MockDataService ? TypeLocator.Resolve <ICartDataService>() : DataService.TypeLocator.Resolve <ICartDataService>(); BindingContext = new WishlistViewModel(wishlistDataService, cartDataService); }
public ProductHomePage() { InitializeComponent(); var productHomeDataService = App.MockDataService ? TypeLocator.Resolve <IProductHomeDataService>() : DataService.TypeLocator.Resolve <IProductHomeDataService>(); var catalogDataService = App.MockDataService ? TypeLocator.Resolve <ICatalogDataService>() : DataService.TypeLocator.Resolve <ICatalogDataService>(); BindingContext = new ProductHomePageViewModel(productHomeDataService, catalogDataService); }
private async void FetchData() { var cartDataService = App.MockDataService ? TypeLocator.Resolve <ICartDataService>() : DataService.TypeLocator.Resolve <ICartDataService>(); var orderedItem = await cartDataService.GetOrderedItemsAsync(App.CurrentUserId); if (orderedItem != null && orderedItem.Count > 0) { (BindingContext as MyOrdersPageViewModel).MyOrders = new ObservableCollection <UserCart>(orderedItem); } }
/// <summary> /// Initializes a new instance of the <see cref="CheckoutPage" /> class. /// </summary> public CheckoutPage() { InitializeComponent(); var userDataService = App.MockDataService ? TypeLocator.Resolve <IUserDataService>() : DataService.TypeLocator.Resolve <IUserDataService>(); var cartDataService = App.MockDataService ? TypeLocator.Resolve <ICartDataService>() : DataService.TypeLocator.Resolve <ICartDataService>(); var catalogDataService = App.MockDataService ? TypeLocator.Resolve <ICatalogDataService>() : DataService.TypeLocator.Resolve <ICatalogDataService>(); BindingContext = new CheckoutPageViewModel(userDataService, cartDataService, catalogDataService); }
public Recorder(bool IsCartPage, string headerText, string contentText, string callerPage, bool isNewApi = false, string screen = null) { InitializeComponent(); var tensflowService = App.MockDataService ? TypeLocator.Resolve <IPytorchService>() : DataService.TypeLocator.Resolve <IPytorchService>(); _rvm = new RecorderViewModel(tensflowService, IsCartPage, headerText, contentText, callerPage, secsBeforeRecording: 5, isNewApi, screen); BindingContext = _rvm; }
/// <summary> /// Initializes a new instance of the <see cref="DetailPage" /> class. /// </summary> public DetailPage(Product selectedProduct) { InitializeComponent(); var catalogDataService = App.MockDataService ? TypeLocator.Resolve <ICatalogDataService>() : DataService.TypeLocator.Resolve <ICatalogDataService>(); var cartDataService = App.MockDataService ? TypeLocator.Resolve <ICartDataService>() : DataService.TypeLocator.Resolve <ICartDataService>(); var wishlistDataService = App.MockDataService ? TypeLocator.Resolve <IWishlistDataService>() : DataService.TypeLocator.Resolve <IWishlistDataService>(); BindingContext = new DetailPageViewModel(catalogDataService, cartDataService, wishlistDataService, selectedProduct); }
/// <summary> /// Initializes a new instance of the <see cref="CatalogListPage" /> class. /// </summary> public CatalogListPage(string selectedCategory) { InitializeComponent(); var catalogDataService = App.MockDataService ? TypeLocator.Resolve <ICatalogDataService>() : DataService.TypeLocator.Resolve <ICatalogDataService>(); var cartDataService = App.MockDataService ? TypeLocator.Resolve <ICartDataService>() : DataService.TypeLocator.Resolve <ICartDataService>(); var wishlistDataService = App.MockDataService ? TypeLocator.Resolve <IWishlistDataService>() : DataService.TypeLocator.Resolve <IWishlistDataService>(); BindingContext = new CatalogPageViewModel(GetType().Name, catalogDataService, cartDataService, wishlistDataService, selectedCategory); }
public App() { InitializeComponent(); if (MockDataService) { TypeLocator.Start(); MainPage = new NavigationPage(new OnBoardingAnimationPage()); } else { ListenNetworkChanges(); if (!SQLiteDatabase.Shared.Initialized) { SQLiteDatabase.Shared.Init(); } DataService.TypeLocator.Start(); MapperConfig.Config(); GetUserInfo(); } }
public App() { Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MjM5OTk5QDMxMzgyZTMxMmUzMEFnUXFRcnloZ1VyZDVHd2lETnhocmNTWjhWQU9OeDdhY0xMZC9kc0MxYkE9;MjQwMDAwQDMxMzgyZTMxMmUzMEFobERaU0IrWW93WURhSnczRzE4aHRncEswZWoydWJjUzFqQmhWaW5zemM9;MjQwMDAxQDMxMzgyZTMxMmUzMEJNTDkxZFFDNmN1anV3UW5tR0tMTnJIUk1uMnpMSHdqN20wQ3ZQWFV4UTg9;MjQwMDAyQDMxMzgyZTMxMmUzMEdzVnJiUnR0bWJEdmFLSWNEVWxZVWxtL2NnYjkrSzEwWGtiZENTR3BMVFU9;MjQwMDAzQDMxMzgyZTMxMmUzMG1ocnJyanRVMHlObW90Sy9kVklscDRjNlg4anZDViswRnQxOHFBamllR1E9;MjQwMDA0QDMxMzgyZTMxMmUzMG9yK2pXWlpQSVU0Z2M3d1pBMi83NmVOdUliRTFhQ0xGb04xYytCYW1EVFk9;MjQwMDA1QDMxMzgyZTMxMmUzMEgranBheFRNS0JHT0ZiLzQrTWZ2WlR5QktPeC9UL3gzbWJ2WDFQVmtaMm89;MjQwMDA2QDMxMzgyZTMxMmUzMGhteCtNM3NRN0FsczVvU3YwdzdUZHpPc1ExcXZwS21vMjlNLzVNVzBpVG89;MjQwMDA3QDMxMzgyZTMxMmUzMGV0QlZOckpwdkxOZmxBTkFQRFFPcDdLSi9sTHRIZGhIMW5IKzlVQW5OR3M9;NT8mJyc2IWhia31ifWN9Z2FoYmF8YGJ8ampqanNiYmlmamlmanMDHmg1ITI9ODw1PDY3JhM0PjI6P30wPD4=;MjQwMDA4QDMxMzgyZTMxMmUzMFc0aHlLSEFNZlJ5L3BDU2YwSERBaTdEZ3J6V25lN01rUmxNU2NjeldaSGM9"); InitializeComponent(); if (MockDataService) { TypeLocator.Start(); MainPage = new NavigationPage(new LanguageSettings()); } else { ListenNetworkChanges(); if (!SQLiteDatabase.Shared.Initialized) { SQLiteDatabase.Shared.Init(); } DataService.TypeLocator.Start(); Mapper = MapperConfig.Config(); GetUserInfo(); } }