Ejemplo n.º 1
0
 public NavigationViewModel(IClientLookupDataService clientLookupDataService,
                            IEventAggregator eventAggregator)
 {
     _clientLookupDataService = clientLookupDataService;
     _eventAggregator         = eventAggregator;
     Clients = new ObservableCollection <NavigationItemViewModel>();
     _eventAggregator.GetEvent <AfterClientSavedEvent>().Subscribe(AfterClientSaved);
 }
Ejemplo n.º 2
0
        public NavigationViewModel(IClientLookupDataService clientLookupService,
                                   IWorkoutLookupDataService workoutLookupService,
                                   IExerciseLookupDataService exerciseLookupDataService,
                                   IEventAggregator eventAggregator)
        {
            _clientLookupService       = clientLookupService;
            _workoutLookupService      = workoutLookupService;
            _exerciseLookupDataService = exerciseLookupDataService;
            _eventAggregator           = eventAggregator;

            Clients   = new ObservableCollection <NavigationItemViewModel>();
            Workouts  = new ObservableCollection <NavigationItemViewModel>();
            Exercises = new ObservableCollection <NavigationItemViewModel>();

            _eventAggregator.GetEvent <AfterDetailSavedEvent>().Subscribe(AfterDetailSaved);
            _eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted);
        }