Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public void Logout()
 {
     Properties["IsLoggedIn"] = false; // only gets set to 'true' on the LoginPage
     MainPage = new BaseLoginPage(this);
 }