void dbUser_DataLoaded(object sender, UserDataLoadedEventArgs e) { DailyBurnService.CurrentUser = dbUser; Dispatcher.BeginInvoke(() => { double calories = (double)e.DailyBurnUser.CaloriesConsumed; txtCaloriesEaten.Text = dbwp7Resources.CaloriesConsumed + calories.ToString(); dailyBurnProgressBar2.MaxCalories = dbUser.CaloriesMax; dailyBurnProgressBar2.CaloriesEaten = dbUser.CaloriesConsumed; txtCaloriesEaten.Text = dbwp7Resources.CaloriesConsumed + dbUser.CaloriesConsumed.ToString(); dailyBurnProgressBar2.CalorieGoalUpperBound = dbUser.CaloriesUpperBound; dailyBurnProgressBar2.CalorieGoalLowerBound = dbUser.CaloriesLowerBound; }); }
protected void OnDataLoaded(UserDataLoadedEventArgs e) { if (DataLoaded != null) DataLoaded(this, e); }