Exemple #1
0
        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);
            }
		}
Exemple #2
0
        private void LoginPage_LoginCancelled(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Blytka 5");
            MainPage = new SignIn();
			System.Diagnostics.Debug.WriteLine("Blytka 6");
        }