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