public ClothesEditViewModelFactory(IEventAggregator eventAggregator, IRegionManager regionManager, IClothesServices clothesService, ITypesService typesService) { this.eventAggregator = eventAggregator; this.regionManager = regionManager; this.clothesService = clothesService; this.typesService = typesService; }
public ClothesEditViewModel(IEventAggregator eventAggregator, IRegionManager regionManager, IClothesServices clothesService, ITypesService typesService, PieceOfClothing pieceOfClothing) { this.eventAggregator = eventAggregator; this.regionManager = regionManager; this.clothesService = clothesService; this.typesService = typesService; CurrentItem = pieceOfClothing; Initialize(); }
public ClothesCreateViewModel(IEventAggregator eventAggregator, IRegionManager regionManager, IClothesServices clothesService, ITypesService typesService) { this.eventAggregator = eventAggregator; this.regionManager = regionManager; this.clothesService = clothesService; this.typesService = typesService; //typesList = typesService.TypesList; TypesService_TypesListUpdated(this, null); typesService.TypesListUpdated += TypesService_TypesListUpdated;//unsubscribe on exit!!!! Initialize(); }
public ClothesListViewModel(IClothesServices clothesService, IEventAggregator eventAggregator) { this.clothesService = clothesService; this.eventAggregator = eventAggregator; eventAggregator.GetEvent <ClothesListUpdateRequestedEvent>().Subscribe(OnUpdateRequested, true); eventAggregator.GetEvent <FilteringConditionsChangedEvent>().Subscribe(OnFilterChanged, true); eventAggregator.GetEvent <SortingConditionsChangedEvent>().Subscribe(OnSortingConditionsChanged, true); eventAggregator.GetEvent <DatabaseConnectionErrorOccuredEvent>().Subscribe(OnDatabaseConnectionError, true); //Might be useful to use event aggregation in the future also for this clothesService.ClothesListUpdated += ClothesService_ClothesListUpdated; UpdateClothesList(); }
public ClothesDetailsLowerButtonsBarViewModel(IEventAggregator eventAggregator, IClothesServices clothesService) { this.clothesService = clothesService; this.eventAggregator = eventAggregator; DisplayDeleteConfirmation = false; InvokePropertyChanged("DisplayPreDeleteButton"); timer = new Timer(2000); timer.Elapsed += Timer_Elapsed; PieceOfClothingChangedEvent evt = eventAggregator.GetEvent <PieceOfClothingChangedEvent>(); evt.Subscribe(OnCurrentItemChanged, true); }
public ClothesDetailsActionButtonsViewModel(IEventAggregator eventAggregator, IUnityContainer container, IRegionManager regionManager, IClothesServices clothesService, ClothesEditViewModelFactory viewModelFactory) { //Use the event aggregation to catch the newly selected item on the list this.eventAggregator = eventAggregator; PieceOfClothingChangedEvent evt = eventAggregator.GetEvent <PieceOfClothingChangedEvent>(); evt.Subscribe(OnCurrentItemChanged, true); //Register the injected fields this.container = container; this.regionManager = regionManager; this.clothesService = clothesService; this.editViewModelFactory = viewModelFactory; }