PdfRpt.Calendar.MonthCalendar.addTextRow C# (CSharp) Method

addTextRow() private method

private addTextRow ( string text, int horizontalAlignment = Element.ALIGN_CENTER, bool showGradient = false ) : void
text string
horizontalAlignment int
showGradient bool
return void
        private void addTextRow(string text, int horizontalAlignment = Element.ALIGN_CENTER, bool showGradient = false)
        {
            if (string.IsNullOrEmpty(text))
                return;

            var monthNameCell = new PdfPCell(getPhrase(text));
            if (showGradient)
            {
                monthNameCell.CellEvent = new GradientCellEvent
                {
                    GradientEndColor = CalendarAttributes.GradientEndColor,
                    GradientStartColor = CalendarAttributes.GradientStartColor
                };
            }
            setCommonPdfPCellProperties(monthNameCell, horizontalAlignment);
            monthNameCell.Colspan = 7;
            _mainTable.AddCell(monthNameCell);
        }