Esempio n. 1
0
        protected async override void OnStart()
        {
            // Handle when your app starts
            IEnumerable <string> collection = await fileEngine.GetFilesAsync();

            if (collection.Contains("AccessToken"))
            {
                accessToken = await fileEngine.ReadTextAsync("AccessToken");
            }

            //User already login then navigate to Dashboard
            if (string.IsNullOrEmpty(accessToken))
            {
                MainPage = new NavigationPage(new MainPage());
            }
            else
            {
                MainPage = new NavigationPage(new DashboardPage());
            }
        }
 public Task <IEnumerable <string> > GetFilesAsync()
 {
     return(fileEngine.GetFilesAsync());
 }