示例#1
0
        public override float Draw(float _curY)
        {
            float     curY = _curY, curX = 100;
            Rectangle rect = Doc.AddRectange(10, curY - 15, doc.PageSize.Width - 10, curY, PDFColor.BCGGreen);

            curY = Doc.AddText(rect, config.MainQuestion, BaseColor.WHITE) + 10;

            rect = new Rectangle(rect.Left, curY - 15, 300, curY);
            curY = doc.AddText(rect.OffSetRectByYAxis(15), config.SubQuestions, PDFColor.BCGBlack);

            if (config.OverAll != null)
            {
                rect = doc.AddRectange(rect.Left, curY - 25, 300, curY - 10, PDFColor.BCGGreen);
                Rectangle rRect = new Rectangle(125, rect.Top, 125 + 25, rect.Bottom);

                curY = doc.AddText(rect, "Overall", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX), "NA", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 35), "1", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "2", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "3", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "4", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "5", BaseColor.WHITE);

                doc.AddRadioGroup(config.OverAll, rRect, new List <String> {
                    "NA", "1", "2", "3", "4", "5"
                }, 25);
            }

            if (config.Comments != null)
            {
                doc.AddTextField(config.Comments,
                                 new Rectangle(300, _curY - 15, doc.PageSize.Width - 10, curY + 5));
            }
            return(curY);
        }
示例#2
0
        public override float Draw(float curY)
        {
            float start = curY;

            Rectangle rect = Doc.AddRectange(10, curY - 15, doc.PageSize.Width - 10, curY, PDFColor.BCGGreen);

            curY = Doc.AddText(rect, config.MainQuestion, BaseColor.WHITE) + 10;

            rect = new Rectangle(rect.Left, curY - 15, 300, curY);
            curY = doc.AddText(rect.OffSetRectByYAxis(15), config.SubQuestions, BaseColor.BLACK);

            rect = doc.AddRectange(rect.Left, curY - 25, 300, curY - 10, PDFColor.BCGGreen);
            doc.AddRectange(rect);
            curY = doc.AddText(rect, "Overall", BaseColor.WHITE);

            curY = doc.AddText(rect.OffSetRectByXAxis(100), "NA", BaseColor.WHITE);
            curY = doc.AddText(rect.OffSetRectByXAxis(125), "1", BaseColor.WHITE);
            curY = doc.AddText(rect.OffSetRectByXAxis(150), "2", BaseColor.WHITE);
            curY = doc.AddText(rect.OffSetRectByXAxis(175), "3", BaseColor.WHITE);
            curY = doc.AddText(rect.OffSetRectByXAxis(200), "4", BaseColor.WHITE);
            curY = doc.AddText(rect.OffSetRectByXAxis(225), "5", BaseColor.WHITE);

            Doc.Writer.Flush();
            return(curY);
        }
示例#3
0
        public override float Draw(float _curY)
        {
            float     curY = _curY, curX = 200;
            Rectangle rect = Doc.AddRectange(10, curY - 15, doc.PageSize.Width - 10, curY, PDFColor.BCGGreen);

            curY = Doc.AddText(rect, config.MainQuestion, BaseColor.WHITE) + 10;
            {
                curY = doc.AddText(rect.OffSetRectByXAxis(curX - rect.Left), "NA", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "1", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "2", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "3", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "4", BaseColor.WHITE);
                curY = doc.AddText(rect.OffSetRectByXAxis(curX += 25), "5", BaseColor.WHITE);
            }
            curX = 200;
            foreach (ItemRef item in getSubQuestions())
            {
                Rectangle rRect = new Rectangle(curX, curY, curX + 15, curY - 15);
                doc.AddRadioGroup(item, rRect, new List <String> {
                    "NA", "1", "2", "3", "4", "5"
                }, 25);
                rect = new Rectangle(10, curY - 15, 200, curY);
                curY = doc.AddText(rect, item.Question, PDFColor.BCGBlack);
            }
            if (config.OverAll != null)
            {
                rect = doc.AddRectange(rect.Left, curY - 25, 350, curY - 10, PDFColor.BCGGreen);
                curY = doc.AddText(rect, "Overall", BaseColor.WHITE);
                Rectangle rRect = new Rectangle(curX, rect.Top, curX + 25, rect.Bottom);
                doc.AddRadioGroup(config.OverAll, rRect, new List <String> {
                    "NA", "1", "2", "3", "4", "5"
                }, 25);
            }

            if (config.Comments != null)
            {
                doc.AddTextField(config.Comments,
                                 new Rectangle(350, _curY - 15, doc.PageSize.Width - 10, curY + 5));
            }
            return(curY);
        }