Ejemplo n.º 1
0
 public HomeViewModel(ITodoListUseCase todoListUseCase, IUserDialogs userDialogs, IMvxNavigationService navigationService)
 {
     this._todoListUseCase  = todoListUseCase;
     this._userDialogs      = userDialogs;
     this.TodoLists         = new ObservableCollection <TodoList>();
     RefreshTodoListCommand = new MvxAsyncCommand(GetTodoLists);
     MakeMainListCommand    = new MvxAsyncCommand <Guid>(MakeMainList);
     AddNewListCommand      = new MvxAsyncCommand(CreateNewTodoList);
     _navigationService     = navigationService;
 }
Ejemplo n.º 2
0
 public TodoListViewModel(ITodoListUseCase todoListUseCase, ITodoItemUseCase todoItemUseCase, IUserDialogs userDialogs, IMvxNavigationService navigationService)
 {
     this._todoListUseCase  = todoListUseCase;
     this._todoItemUseCase  = todoItemUseCase;
     this._userDialogs      = userDialogs;
     this.TodoItems         = new ObservableCollection <TodoItem>();
     RefreshTodoItemCommand = new MvxAsyncCommand(GetTodoItems);
     MarkAsCompleteCommand  = new MvxAsyncCommand <Guid>(MarkTodoAsCompleted);
     AddNewItemCommand      = new MvxAsyncCommand(CreateNewTodoItem);
     _navigationService     = navigationService;
 }