bool onlyOne = false; // View session live for more details. /* * MainPage - Constructor, initialize the componets, make sure there is no live session in the database * Fill projetcs list. */ public MainPage() { List <Project> ProjectsL; if (database.GetUser() == null) { Settings temp_settings = new Settings(); ProjectsL = new List <Project>(); user = new User("Erick", temp_settings, ProjectsL); database.SaveUser(user); } else { user = database.GetUser(); user.projects = database.GetProjectUser(user.Id); } InitializeComponent(); live = database.GetliveSession(); if (live != null) { DisplayAlert("Session left Live", "The appplication was closed and a session was alive the end time was set to now, this can be change on the edit option for the session.", "OK"); live.end = DateTime.Now; database.UpdateSession(live); } Proyects.ItemTapped += OnSelection; GlobalUtilities.setAccel(); }