You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShopNCook/Views/LoginPage.xaml.cs

28 lines
804 B

using Models.Endpoint;
using ShoopNCook.Controllers;
namespace ShoopNCook.Pages;
public partial class LoginPage : ContentPage
{
private readonly LoginController controller;
public LoginPage(LoginController controller)
{
InitializeComponent();
this.controller = controller;
}
private async void OnLoginButtonClicked(object sender, EventArgs e)
{
string email = EmailEntry.Text;
string password = PasswordEntry.Text;
controller.Login(email, password);
}
private async void ForgotPasswordTapped(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new ForgotPassword());
}
private async void RegisterLabbelTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//Register");
}
}