예제 #1
0
        private async void BtnLogin_Click(object sender, RoutedEventArgs e)
        {
            if (await AppState.AttemptLogin(TxtUsername.Text, PswdPassword.Password))
            {
                AppState.CurrentUser = await AppState.LoadUser(TxtUsername.Text);

                AppState.SetUserDatabaseInformation();
                AppState.Navigate(new TrackerPage());
                TxtUsername.Clear();
                PswdPassword.Clear();
                TxtUsername.Focus();
            }
            else
            {
                AppState.DisplayNotification("Invalid credentials. Please try again.", "Personal Tracker");
            }
        }