private static void AddAnswerSection(PDFDocument document, string question, bool answer, float left, float top, float width, float height) { AbsolutePositionText(document, question, left, top, width, height, document.GetRegularFont(false), Element.ALIGN_LEFT); if (answer) { document.FillBox(400, top - 25, 40, 25, BaseColor.LIGHT_GRAY); } else { document.DrawBox(400, top - 25, 40, 25); } if (!answer) { document.FillBox(450, top - 25, 40, 25, BaseColor.LIGHT_GRAY); } else { document.DrawBox(450, top - 25, 40, 25); } AbsolutePositionText(document, Resources.TXT_YES, 412, top - 1, 450, 25, document.GetRegularFont(false), Element.ALIGN_LEFT); AbsolutePositionText(document, Resources.TXT_NO, 464, top - 1, 500, 25, document.GetRegularFont(false), Element.ALIGN_LEFT); }
private static void AddAnswerSection(PDFDocument document, string question, bool hasNotApplicable, bool?answer, float left, float top, float width, float height) { AbsolutePositionText(document, question, left, top, width, height, document.GetLargeFont(false), Element.ALIGN_LEFT); if (answer.HasValue && answer.Value) { document.FillBox(300, top - 25, 80, 25, BaseColor.LIGHT_GRAY); } else { document.DrawBox(300, top - 25, 80, 25); } if (answer.HasValue && !answer.Value) { document.FillBox(380, top - 25, 80, 25, BaseColor.LIGHT_GRAY); } else { document.DrawBox(380, top - 25, 80, 25); } AbsolutePositionText(document, Resources.TXT_YES, 500, top - 1, 305, 25, document.GetLargeFont(false), Element.ALIGN_LEFT); AbsolutePositionText(document, Resources.TXT_NO, 600, top - 1, 385, 25, document.GetLargeFont(false), Element.ALIGN_LEFT); if (hasNotApplicable) { if (!answer.HasValue) { document.FillBox(460, top - 25, 80, 25, BaseColor.LIGHT_GRAY); } else { document.DrawBox(460, top - 25, 80, 25); } AbsolutePositionText(document, Resources.TXT_QC_REPORT_CHECK_NA, 700, top - 1, 465, 25, document.GetLargeFont(false), Element.ALIGN_LEFT); } }