Esempio n. 1
0
        void Push(NavigationPushInfo pushInfo)
        {
            var newPage = pushInfo.To != Marabaka.Pages.HomeTabbed.ToString() ? GetInitializedPage(pushInfo) : null;

            switch (pushInfo.Mode)
            {
            case NavigationMode.Normal:
                NormalPush(newPage, pushInfo.OnCompletedTask);
                break;

            case NavigationMode.Modal:
                ModalPush(newPage, pushInfo.OnCompletedTask, pushInfo.NewNavigationStack);
                break;

            case NavigationMode.RootPage:
                RootPush(newPage, pushInfo.OnCompletedTask);
                break;

            case NavigationMode.Custom:
                CustomPush(newPage, pushInfo.OnCompletedTask);
                break;

            default:
                throw new NotImplementedException();
            }
        }
Esempio n. 2
0
        void NavigationPushCallback(MessageBus bus, NavigationPushInfo navigationPushInfo)
        {
            if (navigationPushInfo == null)
            {
                throw new ArgumentNullException(nameof(navigationPushInfo));
            }
            if (string.IsNullOrEmpty(navigationPushInfo.To))
            {
                throw new FieldAccessException(@"'To' page value should be set");
            }

            Push(navigationPushInfo);
        }
Esempio n. 3
0
 Page GetInitializedPage(NavigationPushInfo navigationPushInfo)
 {
     return(GetInitializedPage(navigationPushInfo.To, navigationPushInfo.NavigationParams));
 }