public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds, string text, Color textColor) : this(original) { Bounds = bounds; Text = text; TextColor = textColor; }
/// <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; }
public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds, string text, TextFormatFlags flags) : this(original) { Bounds = bounds; Text = text; Format |= flags; }
public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original) : base(original) { Font = original.Calendar.Font; Format |= TextFormatFlags.Default | TextFormatFlags.WordBreak | TextFormatFlags.PreserveGraphicsClipping;// | TextFormatFlags.WordEllipsis; TextColor = SystemColors.ControlText; }
public override void OnDrawTimeScale(CalendarRendererEventArgs e) { int margin = 5; int largeX1 = TimeScaleBounds.Left + margin; int largeX2 = TimeScaleBounds.Right - margin; int shortX1 = TimeScaleBounds.Left + TimeScaleBounds.Width / 2; int shortX2 = largeX2; int top = 0; Pen p = new Pen(ColorTable.TimeScaleLine); for (int i = 0; i < e.Calendar.Days[0].TimeUnits.Length; i++) { CalendarTimeScaleUnit unit = e.Calendar.Days[0].TimeUnits[i]; if (!unit.Visible) { continue; } top = unit.Bounds.Top; if (unit.Minutes == 0) { e.Graphics.DrawLine(p, largeX1, top, largeX2, top); } else { e.Graphics.DrawLine(p, shortX1, top, shortX2, top); } } if (e.Calendar.DaysMode == CalendarDaysMode.Expanded && e.Calendar.Days != null && e.Calendar.Days.Length > 0 && e.Calendar.Days[0].TimeUnits != null && e.Calendar.Days[0].TimeUnits.Length > 0 ) { top = e.Calendar.Days[0].BodyBounds.Top; //Timescale top line is full e.Graphics.DrawLine(p, TimeScaleBounds.Left, top, TimeScaleBounds.Right, top); } p.Dispose(); base.OnDrawTimeScale(e); }
public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds) : this(original) { Bounds = bounds; }
public CalendarRendererItemEventArgs(CalendarRendererEventArgs original, CalendarItem item) : base(original) { _item = item; }
public CalendarRendererTimeUnitEventArgs(CalendarRendererEventArgs original, CalendarTimeScaleUnit unit) : base(original) { _unit = unit; }
public override void OnInitialize(CalendarRendererEventArgs e) { base.OnInitialize(e); e.Calendar.Font = SystemFonts.CaptionFont; }
/// <summary> /// Creates a new <see cref="CalendarRendererDayEventArgs"/> object /// </summary> /// <param name="original">Orignal object to copy basic paramters</param> /// <param name="day">Day to render</param> public CalendarRendererDayEventArgs(CalendarRendererEventArgs original, CalendarDay day) : base(original) { _day = day; }
public override void OnDrawBackground(CalendarRendererEventArgs e) { e.Graphics.Clear(ColorTable.Background); }
public override void OnDrawWeekHeaders(CalendarRendererEventArgs e) { base.OnDrawWeekHeaders(e); }