Esempio n. 1
0
        private async Task FillNavigationQueueAsync()
        {
            // do some async tasks to check the startup logic


            var applicationSettingsService = ServiceLocator.Current.GetInstance <IApplicationSettingsService>();

            // step 1: check initial setup
            if (!applicationSettingsService.IsConfigured())
            {
                StartupService.AddToBootSequence(PageTokens.SetupPage);
            }

            // step 2: check user logged in
            if (string.IsNullOrEmpty(applicationSettingsService.GetUser()))
            {
                StartupService.AddToBootSequence(PageTokens.LoginPage);
            }

            // step 3: actual main page
            StartupService.AddToBootSequence(PageTokens.MainPage);
        }