/// <summary>
 /// Creates a new <see cref="CalendarRendererEventArgs"/>
 /// </summary>
 /// <param name="calendar">Calendar where painting</param>
 /// <param name="g">Device where to paint</param>
 /// <param name="clip">Paint event clip area</param>
 public CalendarRendererEventArgs(KryptonCalendar calendar, Graphics g, Rectangle clipRectangle, object tag)
 {
     _calendar = calendar;
     _graphics = g;
     _clip     = clipRectangle;
     _tag      = tag;
 }
 /// <summary>
 /// Copies the parameters from the specified <see cref="CalendarRendererEventArgs"/>
 /// </summary>
 /// <param name="original"></param>
 public CalendarRendererEventArgs(CalendarRendererEventArgs original)
 {
     _calendar = original.Calendar;
     _graphics = original.Graphics;
     _clip     = original.ClipRectangle;
     _tag      = original.Tag;
 }
Beispiel #3
0
        /// <summary>
        /// Creates a new Element
        /// </summary>
        /// <param name="calendar"></param>
        public CalendarSelectableElement(KryptonCalendar calendar)
        {
            if (calendar == null)
            {
                throw new ArgumentNullException("calendar");
            }

            _calendar = calendar;
        }
 /// <summary>
 /// Creates a new Item that belongs to the specified calendar
 /// </summary>
 /// <param name="calendar">Calendar to reference item</param>
 public CalendarItem(KryptonCalendar calendar) : base(calendar)
 {
     _unitsPassing            = new List <CalendarTimeScaleUnit>();
     _topsPassing             = new List <CalendarDayTop>();
     _backgroundColour        = Color.Empty;
     _borderColour            = Color.Empty;
     _oreColour               = Color.Empty;
     _backgroundColourLighter = Color.Empty;
     _imageAlign              = CalendarItemImageAlign.WEST;
 }
Beispiel #5
0
        /// <summary>
        /// Creates a new Day
        /// </summary>
        /// <param name="calendar">Calendar this day belongs to</param>
        /// <param name="date">Date of the day</param>
        /// <param name="index">Index of the day on the current calendar's view</param>
        internal CalendarDay(KryptonCalendar calendar, DateTime date, int index) : base(calendar)
        {
            _containedItems = new List <CalendarItem>();
            _calendar       = calendar;
            _dayTop         = new CalendarDayTop(this);
            _date           = date;
            _index          = index;

            UpdateUnits();
        }
Beispiel #6
0
        public CalendarProfessionalRenderer(KryptonCalendar c) : base(c)
        {
            ColourTable.Background               = FromHex("#E3EFFF");
            ColourTable.DayBackgroundEven        = FromHex("#A5BFE1");
            ColourTable.DayBackgroundOdd         = FromHex("#FFFFFF");
            ColourTable.DayBackgroundSelected    = FromHex("#E6EDF7");
            ColourTable.DayBorder                = FromHex("#5D8CC9");
            ColourTable.DayHeaderBackground      = FromHex("#DFE8F5");
            ColourTable.DayHeaderText            = Color.Black;
            ColourTable.DayHeaderSecondaryText   = Color.Black;
            ColourTable.DayTopBorder             = FromHex("#5D8CC9");
            ColourTable.DayTopSelectedBorder     = FromHex("#5D8CC9");
            ColourTable.DayTopBackground         = FromHex("#A5BFE1");
            ColourTable.DayTopSelectedBackground = FromHex("#294C7A");
            ColourTable.ItemBorder               = FromHex("#5D8CC9");
            ColourTable.ItemBackground           = FromHex("#C0D3EA");
            ColourTable.ItemText                      = Color.Black;
            ColourTable.ItemSecondaryText             = FromHex("#294C7A");
            ColourTable.ItemSelectedBorder            = Color.Black;
            ColourTable.ItemSelectedBackground        = FromHex("#C0D3EA");
            ColourTable.ItemSelectedText              = Color.Black;
            ColourTable.WeekHeaderBackground          = FromHex("#DFE8F5");
            ColourTable.WeekHeaderBorder              = FromHex("#5D8CC9");
            ColourTable.WeekHeaderText                = FromHex("#5D8CC9");
            ColourTable.TodayBorder                   = FromHex("#EE9311");
            ColourTable.TodayTopBackground            = FromHex("#EE9311");
            ColourTable.TimeScaleLine                 = FromHex("#6593CF");
            ColourTable.TimeScaleHours                = FromHex("#6593CF");
            ColourTable.TimeScaleMinutes              = FromHex("#6593CF");
            ColourTable.TimeUnitBackground            = FromHex("#E6EDF7");
            ColourTable.TimeUnitHighlightedBackground = Color.White;
            ColourTable.TimeUnitSelectedBackground    = FromHex("#294C7A");
            ColourTable.TimeUnitBorderLight           = FromHex("#D5E1F1");
            ColourTable.TimeUnitBorderDark            = FromHex("#A5BFE1");
            ColourTable.WeekDayName                   = FromHex("#6593CF");

            SelectedItemBorder = 2f;
            ItemRoundness      = 5;
        }
Beispiel #7
0
 /// <summary>
 /// Creates a new collection that will belong to the specified calendar.
 /// </summary>
 /// <param name="c">Calendar this collection will belong to.</param>
 internal CalendarItemCollection(KryptonCalendar c)
 {
     _calendar = c;
 }
Beispiel #8
0
 /// <summary>
 /// Sets the value of the <see cref="KryptonCalendar"/> property
 /// </summary>
 /// <param name="calendar">Calendar that this range belongs to</param>
 internal void SetCalendar(KryptonCalendar calendar)
 {
     _calendar = calendar;
 }
Beispiel #9
0
 public CalendarSystemRenderer(KryptonCalendar calendar) : base(calendar)
 {
     ColourTable        = new CalendarColourTable();
     SelectedItemBorder = 1;
 }
 /// <summary>
 /// Creates a new item with the specified date range and text
 /// </summary>
 /// <param name="calendar">Calendar to reference item</param>
 /// <param name="startDate">Start date of the item</param>
 /// <param name="endDate">End date of the item</param>
 /// <param name="text">Text of the item</param>
 public CalendarItem(KryptonCalendar calendar, DateTime startDate, DateTime endDate, string text) : this(calendar)
 {
     StartDate = startDate;
     EndDate   = endDate;
     Text      = text;
 }
 /// <summary>
 /// Creates a new item with the specified date, duration and text
 /// </summary>
 /// <param name="calendar">Calendar to reference item</param>
 /// <param name="startDate">Start date of the item</param>
 /// <param name="duration">Duration of the item</param>
 /// <param name="text">Text of the item</param>
 public CalendarItem(KryptonCalendar calendar, DateTime startDate, TimeSpan duration, string text) : this(calendar, startDate, startDate.Add(duration), text)
 {
 }
Beispiel #12
0
 /// <summary>
 /// Creates a new <see cref="KryptonCalendarTextBox"/> for the specified <see cref="KryptonCalendar"/>
 /// </summary>
 /// <param name="calendar">Calendar where this control lives</param>
 public KryptonCalendarTextBox(KryptonCalendar calendar)
 {
     _calendar = calendar;
 }
Beispiel #13
0
 public CalendarLoadEventArgs(KryptonCalendar calendar, DateTime dateStart, DateTime dateEnd)
 {
     _calendar  = calendar;
     _dateEnd   = dateEnd;
     _dateStart = dateStart;
 }
Beispiel #14
0
        //private PaletteRedirect _paletteRedirect;
        #endregion

        #region "Ctor"

        public CalendarKryptonRenderer(KryptonCalendar c)
            : base(c)
        {
            ReloadPalette();
        }
Beispiel #15
0
 /// <summary>
 /// Creates a new week for the specified calendar
 /// </summary>
 /// <param name="calendar">Calendar this week belongs to</param>
 /// <param name="sunday">Start day of the week</param>
 internal CalendarWeek(KryptonCalendar calendar, DateTime firstDay)
 {
     _calendar = calendar;
     _firstDay = firstDay;
 }