Example #1
0
        public MenuPage()
        {
            InitializeComponent();

            var userProfile = BikerService.GetBikerInfo();

            userProfileImage.Source = userProfile.profileImage;
            userProfileName.Text    = userProfile.Name;

            var menuList = SidemenuService.GetSidemenuItem();

            ListViewMenu.ItemsSource   = menuList;
            ListViewMenu.ItemSelected += (sender, e) =>
            {
                if (e.SelectedItem == null)
                {
                    return;
                }

                var page       = ((SideMenuItem)e.SelectedItem).Page;
                var parameters = ((SideMenuItem)e.SelectedItem).Params;
                PageService.GetMasterPage().SideMenuChangePage(page, parameters);
                ((MasterDetailPage)Application.Current.MainPage).IsPresented = false;
                ListViewMenu.SelectedItem = null;
            };
        }
Example #2
0
        public async Task <object[]> GetBikerId(string param)
        {
            var biker = BikerService.GetBikerInfo();

            return(new object[] { biker._id });
        }