コード例 #1
0
        private async Task ClearValidic()
        {
            fitnessListFetcher = null;
            totalValidic.Text  = string.Empty;

            await Task.Delay(10);
        }
コード例 #2
0
        private async Task LoadValidic()
        {
            // Sum of calories
            double total = 0;

            fitnessListFetcher = new ValidicFitnnessDataFetcher();
            fitnessList        = await fitnessListFetcher.fetchFitness();

            if (fitnessList != null)
            {
                foreach (Fitness f in fitnessList)
                {
                    total += (int)f.calories;
                }
            }
            // Display the result
            totalValidic.Text = total.ToString();
        }