public MasterPage(sdk.Models.Profiles.ME me)
        {
            InitializeComponent();
            main       = this;
            Properties = DependencyService.Get <IProperties>();

            //if (Device.OS == TargetPlatform.Windows && Device.Idiom == TargetIdiom.Desktop)
            //    Lb_Copyrate.IsVisible = false;

            // Заполняем меню кнопками
            AddMenuItem("Лента", "flash.png", OnTappedFeed);
            AddMenuItem("Сообщения", "message.png", OnTappedMessage);
            //AddMenuItem("Подписки", "settings.png", OnTappedHome);
            AddMenuItem("Настройки", "settings.png", OnTappedSettings);
            AddMenuItem("Выход", "exit.png", OnTappedExit);


            // Присваем список в "navigationDrawerList"
            navigationDrawerList.ItemsSource = menuList;


            // Данные профайла
            lb_Login.Text     = me.login;
            lb_UserName.Text  = me.fname + " " + me.sname;
            img_Avatar.Source = me.avatar;


            NavPage.PushAsync(ph);
        }
        private void ItemSelected(object sender, SelectedItemChangedEventArgs args)
        {
            var itemText    = (string)args.SelectedItem;
            var tripDisplay = new FavouriteTripDisplay(NavPage, Map, Utility.InBraces(itemText));

            NavPage.PushAsync(tripDisplay.Content);
        }
Exemple #3
0
        private async void NavigateTo(NavPageType pageType, string title = null, bool inner = true, Subject subject = null)
        {
            var newPage = GetPage <Page>(pageType, title, subject);

            if (newPage != null)
            {
                _isOnMain = pageType == NavPageType.MainPage || pageType == NavPageType.AboutPage;
                _lastType = pageType;
                if (inner)
                {
                    await NavPage.PushAsync(newPage);
                }
                else
                {
                    NavPage = new NavigationPage(newPage)
                    {
                        Title = newPage.Title,
                        BarBackgroundColor = _topBarColor,
                        BarTextColor       = _topBarTextColor,
                        BackgroundColor    = _mainBgColor
                    };
                    _mdp.Detail = NavPage;
                }
                _mdp.IsPresented = false;
            }
        }
        private void ItemSelected(object sender, SelectedItemChangedEventArgs args)
        {
            var itemText   = (string)args.SelectedItem;
            var subcontent = new FavouriteSubContent(NavPage, Map, Routes.GetRouteWithShortName(
                                                         Utility.InBraces(itemText)
                                                         ).Id);

            NavPage.PushAsync(subcontent.Content);
        }
        private void ItemSelected(object sender, SelectedItemChangedEventArgs args)
        {
            var itemText = (string)args.SelectedItem;

            if (itemText == AddMessage)
            {
                FavouriteContent content = new FavouriteContent(NavPage, Map);
                NavPage.PushAsync(content.Content);
            }
            else
            {
                FavouriteTripDisplay subcontent = new FavouriteTripDisplay(NavPage, Map, Utility.InBraces(itemText));
                NavPage.PushAsync(subcontent.Content);
            }
        }
Exemple #6
0
 public override async void NavigateToPage(Page page, bool removePrevious = false)
 {
     if (NavPage.CurrentPage == page)
     {
         NavPage.Title = page.Title;
     }
     else
     {
         if (removePrevious)
         {
             await NavPage.PopAsync(false);
         }
         await NavPage.PushAsync(page);
     }
 }
Exemple #7
0
        public async Task GoToVenueProfile(int venueID)
        {
            var openedPage = this.GetOpenedPage(typeof(MainSnookerPage)) as MainSnookerPage;

            if (openedPage != null && openedPage.State == MainSnookerPage.StateEnum.Venue && openedPage.VenueID == venueID)
            {
                return;
            }

            var newPage = new MainSnookerPage();

            newPage.InitAsVenueProfile(venueID);
            await NavPage.PushAsync(newPage);

            this.UpdateNavigationMenuButtons(true);
        }
Exemple #8
0
        public async Task GoToPersonProfile(int athleteID, ProfilePersonStateEnum state = ProfilePersonStateEnum.Unknown)
        {
            var openedPage = this.GetOpenedPage(typeof(MainSnookerPage)) as MainSnookerPage;

            if (openedPage != null && openedPage.State == MainSnookerPage.StateEnum.Person && openedPage.AthleteID == athleteID)
            {
                return;
            }

            var newPage = new MainSnookerPage();

            newPage.InitAsPersonProfile(athleteID, state);
            await NavPage.PushAsync(newPage);

            this.UpdateNavigationMenuButtons(true);
        }
 async private void OnTappedFeed()
 {
     await NavPage.PushAsync(new UI.Feed.Main());
 }
 async private void OnTappedSettings()
 {
     await NavPage.PushAsync(new UI.Settings.Main());
 }
Exemple #11
0
 public void PushPage(Page page)
 {
     NavPage.PushAsync(page);
 }
Exemple #12
0
 public override async void NavigateToModal(ContentPage modal)
 {
     await NavPage.PushAsync(modal);
 }
Exemple #13
0
 public Task PushAsync(Page page)
 {
     return(NavPage.PushAsync(page));
 }
Exemple #14
0
 public Task PushAsync(Page page, bool animated)
 {
     return(NavPage.PushAsync(page, animated));
 }