Пример #1
0
 public override void OnDrawDayHeaderText(CalendarRendererBoxEventArgs e)
 {
     if (_palette != null)
     {
         e.TextColour = _palette.GetContentShortTextColor1(PaletteContentStyle.HeaderForm, PaletteState.Normal);
     }
     base.OnDrawDayHeaderText(e);
 }
        public override void OnDrawItemEndTime(CalendarRendererBoxEventArgs e)
        {
            if (e.TextColour.IsEmpty)
            {
                e.TextColour = ColourTable.ItemSecondaryText;
            }

            base.OnDrawItemEndTime(e);
        }
        public override void OnDrawDayNameHeader(CalendarRendererBoxEventArgs e)
        {
            e.TextColour = ColourTable.WeekDayName;

            base.OnDrawDayNameHeader(e);

            using (Pen p = new Pen(ColourTable.WeekDayName))
            {
                e.Graphics.DrawLine(p, e.Bounds.Right, e.Bounds.Top, e.Bounds.Right, e.Bounds.Bottom);
            }
        }
        public override void OnDrawItemText(CalendarRendererBoxEventArgs e)
        {
            CalendarItem item = e.Tag as CalendarItem;

            if (item != null)
            {
                if (item.IsDragging)
                {
                    e.TextColour = Color.FromArgb(120, e.TextColour);
                }
            }

            base.OnDrawItemText(e);
        }
        public override void OnDrawWeekHeader(CalendarRendererBoxEventArgs e)
        {
            using (Brush b = new SolidBrush(ColourTable.WeekHeaderBackground))
            {
                e.Graphics.FillRectangle(b, e.Bounds);
            }

            using (Pen p = new Pen(ColourTable.WeekHeaderBorder))
            {
                e.Graphics.DrawRectangle(p, e.Bounds);
            }

            e.TextColour = ColourTable.WeekHeaderText;

            base.OnDrawWeekHeader(e);
        }
 public override void OnDrawTimeScaleMinutes(CalendarRendererBoxEventArgs e)
 {
     e.TextColour = ColourTable.TimeScaleMinutes;
     base.OnDrawTimeScaleMinutes(e);
 }