Exemplo n.º 1
0
        private IPdfPCellEvent CellImage(DateTime date)
        {
            IPdfPCellEvent image = new NoCellEvent();   // No image as default.

            if (CellInformation.ContainsKey(date))
            {
                var tmp = CellInformation[date].Image;
                image = EventSpecificImage(tmp.Image, tmp.Width, tmp.Height);
            }
            return(image);
        }
Exemplo n.º 2
0
        private void InsertFooter(DayOfWeek expectedDay)
        {
            // The day of the week don't exist in the month. Insert an empty day in the caledar.
            // For instance: If the first day of February is on a tuesday. The monday belongs to January.
            if (!Dates.Any(d => d.DayOfWeek == expectedDay))
            {
                EmptyDay();
                return;
            }

            var dateInWeek = Dates.First(d => d.DayOfWeek == expectedDay);  // The date of the week for this day of the week.

            if (CellInformation.ContainsKey(dateInWeek))
            {
                var c = CellInformation[dateInWeek];
                AddAnyContent(c.Text.ToString());
            }
            else
            {
                EmptyDay();
            }
        }