Updating visibilities on calendar events on calendar activation/deactivation.

This commit is contained in:
Burak Kaan Köse
2024-12-30 01:15:31 +01:00
parent bb56815210
commit 8cc7d46d7b
5 changed files with 166 additions and 106 deletions

View File

@@ -78,6 +78,8 @@ namespace Wino.Calendar.Controls
collection.CalendarItemRangeAdded += CollectionOfEventsUpdated;
collection.CalendarItemRangeRemoved += CollectionOfEventsUpdated;
collection.CalendarItemsCleared += EventsCleared;
}
private void UnregisterEventCollectionChanged(CalendarEventCollection collection)
@@ -87,10 +89,13 @@ namespace Wino.Calendar.Controls
collection.CalendarItemRangeAdded -= CollectionOfEventsUpdated;
collection.CalendarItemRangeRemoved -= CollectionOfEventsUpdated;
collection.CalendarItemsCleared -= EventsCleared;
}
private void SingleEventUpdated(object sender, ICalendarItem calendarItem) => UpdateCollectionVisuals();
private void CollectionOfEventsUpdated(object sender, List<ICalendarItem> calendarItems) => UpdateCollectionVisuals();
private void EventsCleared(object sender, System.EventArgs e) => UpdateCollectionVisuals();
private void UpdateCollectionVisuals()
{