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

30 lines
702 B

namespace ShoopNCook;
using Models;
using Endpoint;
using LocalEndpoint;
public partial class App : Application, ConnectionObserver, IApp
{
private IEndpoint Endpoint = new LocalEndpoint();
public App()
{
InitializeComponent();
ForceLogin(); //start in login shell
}
public void OnAccountConnected(Account account)
{
Shell shell = new MainAppShell(account, Endpoint, this);
shell.GoToAsync("//Home");
MainPage = shell;
}
public void ForceLogin()
{
Shell shell = new ConnectAppShell(this, Endpoint.AuthService);
shell.GoToAsync("//Splash");
MainPage = shell;
}
}