public MainPage() { //Customize layout this.BackgroundColor = Color.FromHex("#20FFFFFF"); this.BarTextColor = Color.FromHex("#012E8B"); this.BarBackgroundColor = Color.FromHex("#20FFFFDD"); this.SelectedTabColor = Color.Yellow; this.UnselectedTabColor = Color.Turquoise; this.Title = "EBZ"; StorageService _storageService = new StorageService(); Task.Run(async() => { roles = await _storageService.GetFromCache <string[]>("userRoles"); }); var marketersPage = new Views.Marketer.CustomersListPage { Title = "Clients", IconImageSource = "", }; var shop = new Views.Sales.StartSalesPage(); shop.Title = "Shop"; var userPage = new Views.User.ProfilePage(); userPage.Title = "Profile"; var userRxPage = new Views.User.Recharges(); userRxPage.Title = "RX"; var userTxPage = new Views.User.Transactions(); userTxPage.Title = "TX"; //add tabs if (UserIsInRole("Sales") == true) { Children.Add(shop); } Children.Add(userPage); if (UserIsInRole("Customer") == true) { Children.Add(userTxPage); Children.Add(userRxPage); } if (UserIsInRole("Marketer") == true) { Children.Add(marketersPage); } }
public MainPage() { //Customize layout this.BackgroundColor = Color.FromHex("#20FFFFFF"); this.BarTextColor = Color.FromHex("#012E8B"); this.BarBackgroundColor = Color.FromHex("#20FFFFDD"); this.SelectedTabColor = Color.Yellow; this.UnselectedTabColor = Color.Turquoise; this.Title = ""; var shop = new Views.Sales.StartSalesPage(); shop.Title = "TASKS"; var userPage = new Views.User.ProfilePage(); userPage.Title = "Profile"; //add tabs Children.Add(shop); Children.Add(userPage); }