Created
September 11, 2015 03:36
-
-
Save Jazzeroki/1acdfc1c686c58b3d061 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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