コード例 #1
0
        public async void NavigateNotfiy(mPushNotify note)
        {
            DialogService.ShowLoading("Please wait");

            if (note.Type == Keys.NotifyTypes[2])   //order
            {
                if (note.Why == Keys.NotifyWhys[8]) //order-update
                {
                    var order = await OrderService.Instance.FetchOrder(note.Objecter);

                    DialogService.HideLoading();

                    Detail = NavigationPageHelper.Create(new OrderDetail(order));
                    return;
                }
            }
            else if (note.Type == Keys.NotifyTypes[1])                                 //question
            {
                if (note.Why == Keys.NotifyWhys[2] || note.Why == Keys.NotifyTypes[1]) //answer-question & new-question
                {
                    DialogService.HideLoading();
                    Detail = NavigationPageHelper.Create(new Notify());
                    return;
                }
            }
            else if (note.Type == Keys.NotifyTypes[0]) //item
            {
                if (note.Why == Keys.NotifyWhys[9])    //Rate
                {
                    DialogService.HideLoading();
                    Detail = NavigationPageHelper.Create(new Notify());
                }
            }
            DialogService.HideLoading();
        }
コード例 #2
0
 public LandingPages()
 {
     InitializeComponent();
     NavigationPage.SetHasNavigationBar(this, false);
     On <Xamarin.Forms.PlatformConfiguration.Android>().SetIsSwipePagingEnabled(false);
     Children.Add(NavigationPageHelper.CreatePageForTabbedPage(new PrecisionPredictionTapPage(), "Tap It"));
     Children.Add(NavigationPageHelper.CreatePageForTabbedPage(new ScalePrecision(), "Slide It"));
 }
コード例 #3
0
        //protected async override void OnAppearing()
        //{
        //    base.OnAppearing();

        //    SampleCoordinator.SampleSelected += SampleCoordinator_SampleSelected;

        //    if (_showWelcome)
        //    {
        //        _showWelcome = false;

        //        await Navigation.PushModalAsync(NavigationPageHelper.Create(new WalkthroughVariantPage()));//here

        //        await Task.Delay(500)
        //            .ContinueWith(t => NavigationService.BeginInvokeOnMainThreadAsync(InitializeMasterDetail));
        //    }
        //}

        //protected override void OnDisappearing()
        //{
        //    base.OnDisappearing();

        //    SampleCoordinator.SampleSelected -= SampleCoordinator_SampleSelected;
        //}

        private void InitializeMasterDetail(Page page)
        {
            Master = new MainMenu(new NavigationService(Navigation, LaunchSampleInDetail));
            if (page != null)
            {
                Detail = NavigationPageHelper.Create(page);
                return;
            }
            Detail = NavigationPageHelper.Create(new DashBoard());//here
        }
コード例 #4
0
        public async Task NavigateToSample(INavigation navigation)
        {
            SampleCoordinator.RaiseSampleSelected(this);

            if (_justNotifyNavigateIntent)
            {
                return;
            }

            if (_customNavigation != null)
            {
                _customNavigation(navigation);
                return;
            }

            int popCount            = 0;
            int firstPageToPopIndex = 0;

            for (int i = navigation.NavigationStack.Count - 1; i >= 0; i--)
            {
                if (navigation.NavigationStack[i].GetType() == _pageType)
                {
                    firstPageToPopIndex = i + 1;
                    popCount            = navigation.NavigationStack.Count - 1 - i;
                    break;
                }
            }

            if (popCount > 0)
            {
                for (int i = 1; i < popCount; i++)
                {
                    navigation.RemovePage(navigation.NavigationStack[firstPageToPopIndex]);
                }

                await navigation.PopAsync();

                return;
            }

            var page = CreateContentPage();

            if (_modal)
            {
                //await _pageservice.PushModalAsync(NavigationPageHelper.Create(page));
                await navigation.PushModalAsync(NavigationPageHelper.Create(page));
            }
            else
            {
                //await _pageservice.PushAsync(page);
                await navigation.PushAsync(page);
            }
        }
コード例 #5
0
        private void LaunchSampleInDetail(Page page, bool animated)
        {
            // CustomNavBarPage must be handled differently because XF seems not to be considering the
            // "NavigationPage.SetHasNavigationBar(this, false);" when you add the page as the
            // root of the NavigationPage, when you are working in Android.
            if (page is CustomNavBar)
            {
                var navigationPage = NavigationPageHelper.Create(new ContentPage());

                Detail = navigationPage;

                navigationPage.PushAsync(page, false);
            }
            else
            {
                Detail = NavigationPageHelper.Create(page);
            }

            IsPresented = false;
        }
コード例 #6
0
        async void OnImageTapped(Object sender, EventArgs e)
        {
            var imagePreview = new SonProfileFullScreenPage((sender as FFImageLoading.Forms.CachedImage).Source);

            await Navigation.PushModalAsync(NavigationPageHelper.Create(imagePreview));
        }
コード例 #7
0
        public void NavigateTo(PageKeys pageKey, object @params = null)
        {
            _pagePair = new NavigationPageHelper(pageKey, @params);

            OnPageChanged?.Invoke(pageKey, @params);
        }
コード例 #8
0
 public CustomNavigationService()
 {
     _pagePair = new NavigationPageHelper(PageKeys.Login);
 }
コード例 #9
0
 protected async void PushModalAsync(ContentPage page)
 => await Navigation.PushModalAsync(NavigationPageHelper.Create(page));
コード例 #10
0
 public CustomNavigationService()
 {
     _pagePair = new NavigationPageHelper(PageKeys.ArchitectMain);
 }