public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original)
     : base(original)
 {
     Font       = original.Calendar.Font;
     Format    |= TextFormatFlags.Default | TextFormatFlags.WordBreak | TextFormatFlags.PreserveGraphicsClipping;// | TextFormatFlags.WordEllipsis;
     TextColour = SystemColors.ControlText;
 }
 public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds, string text, Color textColour)
     : this(original)
 {
     Bounds     = bounds;
     Text       = text;
     TextColour = textColour;
 }
 public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds, string text, TextFormatFlags flags)
     : this(original)
 {
     Bounds  = bounds;
     Text    = text;
     Format |= flags;
 }
 /// <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;
 }
예제 #5
0
        ///' <summary>
        ///' Shortcut to one on CalendarColourTable
        ///' </summary>
        ///' <param name="color"></param>
        ///' <returns></returns>
        //Private Shared Function FromHex(ByVal color As String) As Color
        //    Return CalendarColourTable.FromHex(color)
        //End Function

        #endregion

        #region "Overrides"

        public override void OnInitialize(CalendarRendererEventArgs e)
        {
            if (_palette != null)
            {
                e.Calendar.Font = _palette.GetContentShortTextFont(PaletteContentStyle.InputControlStandalone, PaletteState.Normal);
            }
            base.OnInitialize(e);
        }
예제 #6
0
        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(ColourTable.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);
        }
예제 #7
0
 public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds)
     : this(original)
 {
     Bounds = bounds;
 }
예제 #8
0
 public override void OnDrawBackground(CalendarRendererEventArgs e)
 {
     e.Graphics.Clear(ColourTable.Background);
 }
예제 #9
0
 public override void OnDrawWeekHeaders(CalendarRendererEventArgs e)
 {
     base.OnDrawWeekHeaders(e);
 }
예제 #10
0
        public override void OnInitialize(CalendarRendererEventArgs e)
        {
            base.OnInitialize(e);

            e.Calendar.Font = SystemFonts.CaptionFont;
        }