Beispiel #1
0
        public ClothesDetailedViewModel(IEventAggregator eventAggregator)
        {
            //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);
        }
        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);
        }
Beispiel #3
0
        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;
        }