-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default implementation of calendar days with events to XCalendar.…
…Core
- Loading branch information
1 parent
cad0305
commit 0515fab
Showing
54 changed files
with
492 additions
and
623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using XCalendar.Core.Collections; | ||
|
||
namespace XCalendar.Core.Interfaces | ||
{ | ||
public interface ICalendarDay : INotifyPropertyChanged | ||
public interface ICalendarDay : ICalendarDay<IEvent> | ||
{ | ||
} | ||
public interface ICalendarDay<TEvent> : INotifyPropertyChanged where TEvent : IEvent | ||
{ | ||
DateTime DateTime { get; set; } | ||
bool IsSelected { get; set; } | ||
bool IsCurrentMonth { get; set; } | ||
bool IsToday { get; set; } | ||
bool IsInvalid { get; set; } | ||
ObservableRangeCollection<TEvent> Events { get; set; } | ||
} | ||
} |
5 changes: 3 additions & 2 deletions
5
XCalendar.Maui/Interfaces/IEvent.cs → XCalendar.Core/Interfaces/IEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
namespace XCalendar.Maui.Interfaces | ||
using System; | ||
|
||
namespace XCalendar.Core.Interfaces | ||
{ | ||
public interface IEvent | ||
{ | ||
string Title { get; set; } | ||
string Description { get; set; } | ||
DateTime DateTime { get; set; } | ||
Color Color { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Xamarin.Forms; | ||
using XCalendar.Core.Models; | ||
|
||
namespace XCalendar.Forms.Models | ||
{ | ||
public class ColoredEvent : Event | ||
{ | ||
#region Fields | ||
private Color _color; | ||
#endregion | ||
|
||
#region Properties | ||
public Color Color | ||
{ | ||
get | ||
{ | ||
return _color; | ||
} | ||
set | ||
{ | ||
if (_color != value) | ||
{ | ||
_color = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
} | ||
#endregion | ||
} | ||
} |
Oops, something went wrong.