示例#1
0
 public DayDescriptionEventArgs(CalendarDayDescription aDescriptor, int aYear, int aMonth, int aDay)
 {
     year       = aYear;
     day        = aDay;
     month      = aMonth;
     descriptor = aDescriptor;
 }
            public WeekColumns(CalendarDayDescription aDescriptor)
            {
                descriptor = aDescriptor;
                CultureInfo ci = Thread.CurrentThread.CurrentCulture;
                int         d  = (int)ci.DateTimeFormat.FirstDayOfWeek;

                for (int i = 0; i < 7; i++)
                {
                    PackEnd(new DayRows((DayOfWeek)d, aDescriptor), false);
                    d = (d + 1) % 7;
                }
            }
 public DayCell(CalendarDayDescription aDescriptor)
     : base()
 {
     DayNumber.StateResolving = ValueResolveMethod.Manual;
     Descriptor = aDescriptor;
     Padding    = 2;
     Pack(MainBox);
     MainBox.Spacing = 1;
     DayNumber.XPos  = 0.0;
     DayNumber.YPos  = 0.0;
     MainBox.PackEnd(DayNumber, false);
     MainBox.PackEnd(Description, true);
     Description.Visible = aDescriptor.DescriptionsVisible;
     MainBox.PackEnd(Icons, false);
     Icons.Visible = aDescriptor.IconsVisible;
 }
            public DayRows(DayOfWeek aWeekDay, CalendarDayDescription aDescriptor)
            {
                Spacing    = 1;
                descriptor = aDescriptor;
                weekDay    = aWeekDay;
                CultureInfo         ci  = Thread.CurrentThread.CurrentCulture;
                DrawingCellEditText day = new DrawingCellEditText();

                day.Text = ci.DateTimeFormat.GetAbbreviatedDayName(weekDay);
                PackEnd(day, false);
                //day.XPos = 0.5;

                for (int i = 0; i < 7; i++)
                {
                    PackEnd(new DayCell(aDescriptor), false);
                }
            }