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

32 lines
770 B

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