示例#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);
            });
        }
示例#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());
         }
     });
 }
示例#3
0
 public void OnDeserialized(System.Runtime.Serialization.StreamingContext context)
 {
     using (var stateRepo = new BodyStateRepository())
     {
         bodyState = stateRepo.GetLastState();
     }
 }