Beispiel #1
0
        public void SaveUser(User user)
        {
            this.user = user;
            UpdateDietPlan();
            RunInBackground(() =>
            {
                using (var repo = new BodyStateRepository())
                {
                    user.UpdateBodyState(repo.Add(user.BodyState));
                }

                IsolatedStorage.WriteValue(Constants.CacheKeys.User, user);
            });
        }
Beispiel #2
0
 protected override void InitializeExecute()
 {
     base.InitializeExecute();
     IsPhotoVisible = false;
     RunInBackground(() =>
     {
         using (var repo = new BodyStateRepository())
         {
             bodyStates = repo.GetListForProgress(20);
             selectedType = ViewModels.DiagramType.Weight;
             InvokeInUIThread(() => OnSelectedTypeChanged());
         }
     });
 }
Beispiel #3
0
 public void OnDeserialized(System.Runtime.Serialization.StreamingContext context)
 {
     using (var stateRepo = new BodyStateRepository())
     {
         bodyState = stateRepo.GetLastState();
     }
 }