Exemple #1
0
 public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds, string text, TextFormatFlags flags)
     : this(original)
 {
     Bounds  = bounds;
     Text    = text;
     Format |= flags;
 }
Exemple #2
0
 public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds, string text, Color textColour)
     : this(original)
 {
     Bounds     = bounds;
     Text       = text;
     TextColour = textColour;
 }
Exemple #3
0
 public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original)
     : base(original)
 {
     Font       = original.Calendar.Font;
     Format    |= TextFormatFlags.Default | TextFormatFlags.WordBreak | TextFormatFlags.PreserveGraphicsClipping;// | TextFormatFlags.WordEllipsis;
     TextColour = SystemColors.ControlText;
 }
 /// <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;
 }
Exemple #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);
        }
        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);
        }
Exemple #7
0
 public CalendarRendererBoxEventArgs(CalendarRendererEventArgs original, Rectangle bounds)
     : this(original)
 {
     Bounds = bounds;
 }
 public override void OnDrawBackground(CalendarRendererEventArgs e)
 {
     e.Graphics.Clear(ColourTable.Background);
 }
 public override void OnDrawWeekHeaders(CalendarRendererEventArgs e)
 {
     base.OnDrawWeekHeaders(e);
 }
        public override void OnInitialize(CalendarRendererEventArgs e)
        {
            base.OnInitialize(e);

            e.Calendar.Font = SystemFonts.CaptionFont;
        }