Beispiel #1
0
        private CalendarMonthCell CreateMonthCell(int month)
        {
            CalendarMonthCell monthCell = (CalendarMonthCell)calendarCellFactory.CreateCalendarCell("month");

            monthCell.MonthCellMouseClick += new CalendarMonthCellMouseClickEventHandler(CalendarMonthCell_MouseClick);
            monthCell.Month = month;
            return(monthCell);
        }
Beispiel #2
0
        private void BuildCalendarMonthPart()
        {
            this.monthCells = new List <CalendarMonthCell>();
            CalendarMonthCell januaryCell = CreateMonthCell(1);

            this.monthCells.Add(januaryCell);
            this.Controls.Add(januaryCell, 0, 1);

            CalendarMonthCell februaryCell = CreateMonthCell(2);

            this.monthCells.Add(februaryCell);
            this.Controls.Add(februaryCell, 1, 1);

            CalendarMonthCell marchCell = CreateMonthCell(3);

            this.monthCells.Add(marchCell);
            this.Controls.Add(marchCell, 2, 1);

            CalendarMonthCell aprilCell = CreateMonthCell(4);

            this.monthCells.Add(aprilCell);
            this.Controls.Add(aprilCell, 3, 1);

            CalendarMonthCell mayCell = CreateMonthCell(5);

            this.monthCells.Add(mayCell);
            this.Controls.Add(mayCell, 4, 1);

            CalendarMonthCell juneCell = CreateMonthCell(6);

            this.monthCells.Add(juneCell);
            this.Controls.Add(juneCell, 5, 1);

            CalendarMonthCell julyCell = CreateMonthCell(7);

            this.monthCells.Add(julyCell);
            this.Controls.Add(julyCell, 6, 1);

            CalendarMonthCell augustCell = CreateMonthCell(8);

            this.monthCells.Add(augustCell);
            this.Controls.Add(augustCell, 1, 2);

            CalendarMonthCell septemberCell = CreateMonthCell(9);

            this.monthCells.Add(septemberCell);
            this.Controls.Add(septemberCell, 2, 2);

            CalendarMonthCell octoberCell = CreateMonthCell(10);

            this.monthCells.Add(octoberCell);
            this.Controls.Add(octoberCell, 3, 2);

            CalendarMonthCell novemberCell = CreateMonthCell(11);

            this.monthCells.Add(novemberCell);
            this.Controls.Add(novemberCell, 4, 2);

            CalendarMonthCell decemberCell = CreateMonthCell(12);

            this.monthCells.Add(decemberCell);
            this.Controls.Add(decemberCell, 5, 2);
        }