Ejemplo n.º 1
0
        public override async Task <bool> PrepareView(params object[] data)
        {
            //string isRemember = LocalStorage.Storage[StorageKey.IsAccountRemember];
            //if (!string.IsNullOrEmpty(isRemember))
            //	IsRemembered = bool.Parse(isRemember);

            //Email = LocalStorage.Storage[StorageKey.UserEmail];
            //Password = LocalStorage.Storage[StorageKey.UserPassword];

            var user = await SQLiteService.FirstAsync <User>();

            if (user != null)
            {
                Email        = user.Email;
                Password     = user.Password;
                IsRemembered = user.IsRemember;
            }
            else
            {
                Email        = string.Empty;
                Password     = string.Empty;
                IsRemembered = false;
            }

            return(await Task.FromResult(true));
        }