コード例 #1
0
 /// <summary>
 /// uses calendarRepository for getting the newest list from server
 /// </summary>
 public async void ShowAll()
 {
     CalendarEntries.Clear();
     _fullEntrieList = (await _calendarRepository.GetCalendarEntriesAsync()).ToList();
     CalendarEntries.AddRange(_fullEntrieList);
     NotifyOfPropertyChange(() => CalendarEntries);
 }
コード例 #2
0
        /// <summary>
        /// Search for CalendarEntrie within StartTime and EndTime
        /// </summary>
        public void Search()
        {
            var list = _fullEntrieList.Where(i => i.StartTime >= StartTime && i.EndTime <= EndTime.AddDays(1));

            CalendarEntries.Clear();
            CalendarEntries.AddRange(list);
        }
コード例 #3
0
 public CalendarViewModel(ICalendarRepository calendarRepository, IWindowManager windowManager)
 {
     _calendarRepository = calendarRepository;
     _windowManager      = windowManager;
     _fullEntrieList     = _calendarRepository.GetCalendarEntries().ToList();
     CalendarEntries.AddRange(_fullEntrieList);
     SelectedEntrie = _calendarEntries.FirstOrDefault();
 }