Пример #1
0
        public static Bitmap Calendar(Calendar calendar, int month_index, int year, Size size)
        {
            CalendarPanel calendarPanel = new CalendarPanel()
            {
                Calendar   = calendar,
                MonthIndex = month_index,
                Year       = year,
                Size       = size
            };
            Bitmap bitmap = new Bitmap(calendarPanel.Width, calendarPanel.Height);

            calendarPanel.DrawToBitmap(bitmap, calendarPanel.ClientRectangle);
            return(bitmap);
        }
Пример #2
0
        public static Bitmap Calendar(Calendar calendar, int month_index, int year, Size size)
        {
            CalendarPanel ctrl = new CalendarPanel();

            ctrl.Calendar   = calendar;
            ctrl.MonthIndex = month_index;
            ctrl.Year       = year;
            ctrl.Size       = size;

            Bitmap bmp = new Bitmap(ctrl.Width, ctrl.Height);

            ctrl.DrawToBitmap(bmp, ctrl.ClientRectangle);

            return(bmp);
        }