/// <summary> /// Creates a new Event /// </summary> /// <param name="original"></param> /// <param name="bounds"></param> /// <param name="isFirst"></param> /// <param name="isLast"></param> internal CalendarRendererItemBoundsEventArgs(CalendarRendererItemEventArgs original, Rectangle bounds, bool isFirst, bool isLast) : base(original, original.Item) { _isFirst = isFirst; _isLast = isLast; _bounds = bounds; }
/// <summary> /// Draws an item of the calendar /// </summary> /// <param name="e">Event Info</param> public virtual void OnDrawItem(CalendarRendererItemEventArgs e) { List<Rectangle> rects = new List<Rectangle>(e.Item.GetAllBounds()); for (int i = 0; i < rects.Count; i++) { CalendarRendererItemBoundsEventArgs evt = new CalendarRendererItemBoundsEventArgs( e, rects[i], i == 0 && !e.Item.IsOpenStart, (i == rects.Count - 1) && !e.Item.IsOpenEnd); //OnDrawItemShadow(evt); OnDrawItemBackground(evt); if (!evt.Item.PatternColor.IsEmpty) { OnDrawItemPattern(evt); } if (!e.Item.IsEditing) { OnDrawItemContent(evt); } SmoothingMode smbuff = e.Graphics.SmoothingMode; e.Graphics.SmoothingMode = SmoothingMode.HighQuality; OnDrawItemBorder(evt); e.Graphics.SmoothingMode = smbuff; } }