Inheritance: BaseContentPage
コード例 #1
0
		public async void HandleLoginSucceeded(object sender, EventArgs e)
		{	
			//awaits writing token to storage and resets the MainPage UI
			await storeToken ();
			MainPage = new Welcome();


			 
		}
コード例 #2
0
		public App() 
		{
			//Eventsfired from the LoginPage to trigger actions here
			LoginPage.LoginSucceeded += HandleLoginSucceeded; 
			LoginPage.LoginCancelled += CancelLoginAction;

			//Sets the UI to Welcome(), since it is a BaseContentPage it will first check if authorized
			MainPage = new Welcome();
			//This loads a user token if existent, or else it will load "null" 
			StoredToken = DependencyService.Get<Login.App.ISaveAndLoad> ().LoadText ("token");

		}