Exemplo n.º 1
0
        public async Task DownloadDB()
        {
            await UserItem.GetItemsAsync(true, false);

            await WorkoutItem.GetItemsAsync(true, false);

            await MapPoint.GetItemsAsync(true, false);
        }
        protected async override void OnAppearing()
        {
            base.OnAppearing();

            var userList = await userManager.GetItemsAsync();

            birthdayText.Date = userList.First().Birth;

            if (userList.First().Gender.Equals("F"))
            {
                genderSwitch.IsToggled = true;
            }
            else
            {
                genderSwitch.IsToggled = false;
            }

            weightText.Text = Convert.ToString(userList.First().Weight);
            heightText.Text = Convert.ToString(userList.First().Height);
        }
Exemplo n.º 3
0
        public async Task <bool> AcountExist()
        {
            UserItemManager userManager = DBConnection.MainConnection.UserItem;
            await userManager.ClearTable();

            var isLogged = await userManager.GetItemsAsync(true, false);

            if (isLogged.Count == 1)
            {
                return(await Task.FromResult(true));
            }
            else
            {
                return(await Task.FromResult(false));
            }
        }