コード例 #1
0
 private void SaveCategory()
 {
     if (SavedCategory != null)
     {
         var savedCat = _repository.Save(new List <IBaseModel> {
             SavedCategory
         }).First();
         _categories.Add(savedCat);
         RaisePropertyChanged(() => Categories);
         RaisePropertyChanged(() => FilteredCategories);
         SavedCategoryName  = "";
         SavedCategoryColor = "";
         CloseSaveCategoryAction?.Invoke();
     }
 }
コード例 #2
0
        private void SaveTodo()
        {
            if (SavedTodoItem != null)
            {
                _repository.Save(new List <IBaseModel> {
                    SavedTodoItem
                });
                _categories = _repository.GetCategories();
                RaisePropertyChanged(() => Categories);
                RaisePropertyChanged(() => FilteredCategories);
                SavedTodoDescription = "";
                SavedTodoTitle       = "";
                SelectedCategory     = null;

                CloseSaveCategoryAction?.Invoke();
            }
        }