Esempio n. 1
0
 public OverViewModel(IEventAggregator eventaggregator)
 {
     eventaggregator.GetEvent <NewsEvent>().Subscribe(LoadOverView);
     YearToSelect = CreateYearEntrysForComboBoxSelection.AddYearsToComboBox();
     SelectedYear = YearToSelect.FirstOrDefault();
     RegisterCommands();
     LoadCars();
 }
 public CarRefuelTrackerCarEntryOverViewModel(IEventAggregator ea)
 {
     _eventAggregator = ea;
     _eventAggregator.GetEvent <ObjectEvent>().Subscribe(HandleCarModelSelection);
     _eventAggregator.GetEvent <NewsEvent>().Subscribe(HandleEntryEvent);
     _eventAggregator.GetEvent <NewsEvent>().Subscribe(HandleUiReloadEvent);
     YearsToSelect = CreateYearEntrysForComboBoxSelection.AddYearsToComboBox();
     SelectedYear  = YearsToSelect.FirstOrDefault();
     RegisterCommands();
 }