public JourneyCalendarsViewModel(IQueryDispatcher queryDispatcher, IEventBus eventBus) { _queryDispatcher = queryDispatcher; _eventBus = eventBus; _calendarContentProvider = new CalendarContentProvider(queryDispatcher); _calendars = new ObservableCollection <PassengerLiftCalendar>(); _calendarsWrapper = new ReadOnlyObservableCollection <PassengerLiftCalendar>(_calendars); _eventBus.RegisterListener <JourneyWithLiftsAddedEvent>(Handle); }
public PassengerLiftCalendar(Passenger passenger, Month initialMonth, CalendarContentProvider contentProvider) { _contentProvider = contentProvider; _passenger = passenger; _monthSelector = new MonthSelector(initialMonth); _monthCalendar = new CalendarMonth(); _monthSelector.CurrentChanged += OnCurrentMonthChanged; ChangeThenFill(); }