public App () { InitializeComponent(); //Eventsfired from the LoginPage to trigger actions here LoginPage.FacebookLoginSucceeded += LoginPage_LoginSucceeded; LoginPage.LoginCancelled += LoginPage_LoginCancelled; LoginPage.HowlOutLoginAttempted += SetHowlOutLogin; //This loads a user token if existent, or else it will load "null" StoredToken = DependencyService.Get<HowlOut.App.ISaveAndLoad>().LoadText("token"); StoredUserFacebookId = DependencyService.Get<HowlOut.App.ISaveAndLoad> ().LoadText ("userFacebookId"); StoredApiKey = DependencyService.Get<HowlOut.App.ISaveAndLoad>().LoadText("StoredApiKey"); System.Diagnostics.Debug.WriteLine ("STORED FACEBOOK ID"); System.Diagnostics.Debug.WriteLine (StoredUserFacebookId); _dataManager = new DataManager(); _dataManager.UtilityManager.updateLastKnownPosition (); if (!App.IsLoggedIn) { MainPage = new SignIn(); } else { //CrossLocalNotifications.Current.Show ("Notifications works!!", "Nice",99,DateTime.Now.AddSeconds(30)); coreView = new CoreView(); MainPage = coreView; startProgram(coreView); } }
private void LoginPage_LoginCancelled(object sender, EventArgs e) { System.Diagnostics.Debug.WriteLine("Blytka 5"); MainPage = new SignIn(); System.Diagnostics.Debug.WriteLine("Blytka 6"); }