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/ConnectAppShell.xaml.cs

25 lines
914 B

namespace ShoopNCook;
using Microsoft.Maui.Controls;
using Models;
using Services;
using ShoopNCook.Controllers;
using ShoopNCook.Pages;
// Shell pour la phase de connexion de l'application
public partial class ConnectAppShell : Shell
{
// Constructeur qui prend un observateur de connexion et un service d'authentification en argument
public ConnectAppShell(ConnectionObserver observer, IAuthService accounts)
{
// Création d'un nouveau contrôleur de connexion
ConnectionController controller = new ConnectionController(observer, accounts);
InitializeComponent();
// Initialisation des pages de connexion et d'inscription avec le contrôleur de connexion
LoginPage.ContentTemplate = new DataTemplate(() => new LoginPage(controller));
RegisterPage.ContentTemplate = new DataTemplate(() => new RegisterPage(controller));
}
}