示例#1
0
        private void btn_Login_Click(object sender, RoutedEventArgs e)
        {
            tbl_LoginWarning.Visibility = Visibility.Visible;

            switch (ViewControllerStudent.Login(this, tbx_LoginEmail.Text.ToLower(), tbx_LoginPassword.Password))
            {
            case ViewControllerStudent.LoginResponse.InvalidUser:
                tbl_LoginWarning.Text = "Ingen sådan användare existerar!";
                break;

            case ViewControllerStudent.LoginResponse.InvalidPassword:
                tbl_LoginWarning.Text = "Felaktigt lösenord!";
                break;

            case ViewControllerStudent.LoginResponse.Success:
                tbl_LoginWarning.Text = "Loggar in...";
                break;
            }
        }
示例#2
0
 private void btn_Logout_MouseDown(object sender, MouseButtonEventArgs e)
 {
     ViewControllerStudent.Logout(this);
 }