using System; using System.Drawing; using Config.CalendarEvent; namespace TBF.UI.Calendar { /// /// An event that defines a holiday /// public class HolidayEvent : ICalendarEvent { public DateTime Date { get; set; } public Frequency Frequency { get; set; } public bool AllDay { get; set; } public bool TriggerOnExactDayOnly { get; set; } public string Source { get; set; } public string Title { get; set; } public AutoAction AutoAction { get; set; } public string Parameters { get; set; } public int Rank { get; set; } public bool Hidden { get; set; } public bool ReadOnly { get; set; } public int BackColor { get; set; } public int TextColor { get; set; } public bool TooltipEnabled { get; set; } public Config.CalendarEvent.CustomRecurringFrequenciesHandler CustomRecurringFunction { get; set; } /// /// HolidayEvent Constructor /// public HolidayEvent() { /// Date Frequency = Frequency.Once; AllDay = true; TriggerOnExactDayOnly = true; Source = "Calendar"; /// Text AutoAction = AutoAction.None; Parameters = string.Empty; Rank = 1; Hidden = false; ReadOnly = true; BackColor = unchecked((int)0xFF50AAFF); TextColor = unchecked((int)0xFFFFFFFF); TooltipEnabled = true; } public ICalendarEvent Clone() { return new HolidayEvent { Date = this.Date, Frequency = this.Frequency, AllDay = this.AllDay, TriggerOnExactDayOnly = this.TriggerOnExactDayOnly, Source = this.Source, Title = this.Title, AutoAction = this.AutoAction, Parameters = this.Parameters, Rank = this.Rank, Hidden = this.Hidden, ReadOnly = this.ReadOnly, BackColor = this.BackColor, TextColor = this.TextColor, TooltipEnabled = this.TooltipEnabled, CustomRecurringFunction = this.CustomRecurringFunction, }; } public override string ToString() { return Title; } } }