コード例 #1
0
 public DayDescriptionEventArgs(CalendarDayDescription aDescriptor, int aYear, int aMonth, int aDay)
 {
     year       = aYear;
     day        = aDay;
     month      = aMonth;
     descriptor = aDescriptor;
 }
コード例 #2
0
            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;
                }
            }
コード例 #3
0
 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;
 }
コード例 #4
0
            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);
                }
            }