Skip to content

Instantly share code, notes, and snippets.

@Jazzeroki
Created September 11, 2015 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jazzeroki/1acdfc1c686c58b3d061 to your computer and use it in GitHub Desktop.
Save Jazzeroki/1acdfc1c686c58b3d061 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using Xamarin.Forms;
namespace LacunaExpress.Pages
{
public class Splash : ContentPage
{
AccountManagement.AccountManager accountManager = new AccountManagement.AccountManager();
public Splash()
{
var mainLayout = new StackLayout
{
BackgroundColor = Color.FromRgb(0, 0, 128),
Padding = new Thickness(5),
Children = {
welcome
}
};
Content = mainLayout;
if (Device.OS == TargetPlatform.iOS)
{
welcome.SeparatorColor = Color.Black;
mainLayout.Padding = new Thickness(0, 20, 0, 0);
}
LoadAccountsIntoPicker();
}
async void LoadAccountsIntoPicker()
{
AccountManagement.AccountManager accountManger = new AccountManagement.AccountManager();
var activeAccount = await accountManager.GetActiveAccountAsync();
if (activeAccount == null)
{
await Navigation.PushModalAsync(new LacunaExpress.Pages.AccountPages.Login());
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment