예제 #1
0
        public CalendarViewModel(
            IConnectivityService connectivityService,
            IBookingApi bookingApi,
            INavigationService navigationService,
            IToastService toastService,
            ISecurityManager securityManager)
            : base(connectivityService)
        {
            _bookingApi        = bookingApi;
            _navigationService = navigationService;
            _toastService      = toastService;
            _securityManager   = securityManager;

            MonthSelectedCommand       = new RelayCommand <DateTime>(DateSelected);
            BookingDateSelectedCommand = new RelayCommand <BookingDayViewModel>(BookingDateSelected);

            CurrentDisplayedDate = DateTime.Now;
            BookingDaysInMonth   = BookingCalendarUtility.GetDaysInMonth(CurrentDisplayedDate);
        }
예제 #2
0
 private void DateSelected(DateTime date)
 {
     CurrentDisplayedDate = date;
     BookingDaysInMonth   = BookingCalendarUtility.GetDaysInMonth(CurrentDisplayedDate);
     UpdateBookingDaysInMonthOfDay(BookingDaysInMonth);
 }