public App() { Current = this; InitializeComponent(); if (UseMockDataStore) { DependencyService.Register <MockDataStore>(); } else { DependencyService.Register <AzureDataStore>(); } var isLoggedIn = Properties.ContainsKey("IsLoggedIn") ? (bool)Properties["IsLoggedIn"] : false; if (isLoggedIn) { MainPage = new TeacherPortalMainPage(this); } else { MainPage = new BaseLoginPage(this); } }
public void Logout() { Properties["IsLoggedIn"] = false; // only gets set to 'true' on the LoginPage MainPage = new BaseLoginPage(this); }