Some adjustments for all day items control. Removed the leaking part.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user