Пример #1
0
 public TimelinePaintEventArgs(Graphics graphics, Rectangle clipRect, SchedulerControl chart, DateTime datetime, DateTime datetimeprev, HeaderLabel minor, HeaderLabel major)
     : base(graphics, clipRect, chart)
 {
     Handled      = false;
     DateTime     = datetime;
     DateTimePrev = datetimeprev;
     Minor        = minor;
     Major        = major;
 }
Пример #2
0
 private void GetLabel(DateTime datetime, out HeaderLabel minorLabel, out HeaderLabel majorLabel)
 {
     System.Globalization.GregorianCalendar calendar = new System.Globalization.GregorianCalendar();
     switch (control.TimeResolution)
     {
     default:     // case TimeResolution.Day: -- to implement other TimeResolutions, add to this function or listen to the the PaintTimeline event
         minorLabel = new HeaderLabel()
         {
             Text = datetime.Day.ToString(), Format = control.MinorLabelFormat
         };
         majorLabel = new HeaderLabel()
         {
             Format = control.MajorLabelFormat
         };
         if (datetime.Day == 15)
         {
             majorLabel.Text = datetime.ToString("MMM");
         }
         break;
     }
 }