Ejemplo n.º 1
0
        protected override void OnInitialized()
        {
            try
            {
                Xamarin.Forms.Mocks.MockForms.Init();
                CreateMocks();
                ConfigureAppWideSettings();
                ConfigureDatabaseInitilization();

                var unityContainer = Container.GetContainer();
                unityContainer.RegisterInstance <INavigationService>(NavigationService, new ContainerControlledLifetimeManager());
                AppUnityContainer.Init(unityContainer);
                AppCrossConnectivity.Init(unityContainer.Resolve <IConnectivity>());

                if (WasWelcomeInstructionsLoaded())
                {
                    NavigateToRootPage(nameof(WikiPage), Container.Resolve <INavigationStackService>(), NavigationService);
                }
                else
                {
                    NavigateToRootPage(nameof(WelcomeInstructionsPage), Container.Resolve <INavigationStackService>(), NavigationService);
                }

                AllowAppPermissions();
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 2
0
        protected override async void OnInitialized()
        {
            try
            {
                InitializeComponent();
                InitFakeData();
                ConfigureAppWideSettings();
                ConfigureDatabaseInitilization();

                var unityContainer = Container.GetContainer();
                unityContainer.RegisterInstance <INavigationService>(NavigationService, new ContainerControlledLifetimeManager());
                AppCrossConnectivity.Init(unityContainer.Resolve <IConnectivity>());
                AppUnityContainer.Init(unityContainer);

                if (WasSignedUpAndLogon())
                {
                    await NavigateToRootPage(nameof(MainTabbedPage) + AddPagesInTab(), unityContainer.Resolve <INavigationStackService>(), NavigationService);
                }
                else
                {
                    await NavigateToRootPage(nameof(LogonPage), unityContainer.Resolve <INavigationStackService>(), NavigationService);
                }

                AllowAppPermissions();
            }
            catch (Exception ex)
            {
                AppUnityContainer.Instance.Resolve <IDependencyService>().Get <ILogger>().Log(ex);
            }
        }
Ejemplo n.º 3
0
        protected override void OnInitialized()
        {
            InitializeComponent();
            InitFakeData();
            ConfigureAppWideSettings();
            ConfigureDatabaseInitilization();

            var unityContainer = Container.GetContainer();

            unityContainer.RegisterInstance <INavigationService>(NavigationService, new ContainerControlledLifetimeManager());
            AppUnityContainer.Init(unityContainer);
            AppCrossConnectivity.Init(CrossConnectivity.Current);

            if (WasWelcomeInstructionsLoaded())
            {
                NavigateToRootPage(nameof(WikiPage), Container.Resolve <INavigationStackService>(), NavigationService);
            }
            else
            {
                NavigateToRootPage(nameof(WelcomeInstructionsPage), Container.Resolve <INavigationStackService>(), NavigationService);
            }

            AllowAppPermissions();
        }