Some adjustments for all day items control. Removed the leaking part.

This commit is contained in:
Burak Kaan Köse
2024-12-31 19:21:07 +01:00
parent 05ebfa68c9
commit d524143a53
11 changed files with 157 additions and 83 deletions

View File

@@ -26,9 +26,10 @@ namespace Wino.Core.Domain.Collections
public CalendarEventCollection(ITimePeriod period)
{
Period = period;
RegularEvents = new ReadOnlyObservableCollection<ICalendarItem>(_internalRegularEvents);
AllDayEvents = new ReadOnlyObservableCollection<ICalendarItem>(_internalAllDayEvents);
Period = period;
}
public bool HasCalendarEvent(AccountCalendar accountCalendar)

View File

@@ -38,6 +38,22 @@ namespace Wino.Core.Domain.Entities.Calendar
}
}
public bool IsAllDayEvent
{
get
{
return StartDate.TimeOfDay == TimeSpan.Zero && EndDate.TimeOfDay == TimeSpan.Zero;
}
}
public bool IsMultiDayEvent
{
get
{
return StartDate.Date != EndDate.Date;
}
}
public double DurationInSeconds { get; set; }
public string Recurrence { get; set; }

View File

@@ -12,5 +12,7 @@ namespace Wino.Core.Domain.Interfaces
DateTime EndDate { get; }
double DurationInSeconds { get; set; }
ITimePeriod Period { get; }
bool IsAllDayEvent { get; }
bool IsMultiDayEvent { get; }
}
}