From 0eeac0cb7f31d756fd63d8ae681bd9ad2b8da8c8 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 3 Feb 2016 15:14:08 +0000 Subject: [PATCH] Allow the userr to speciffy if they want annotations to be listed for non-annotation searches --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 8 ++++++++ PROMS/Volian.Print.Library/PDFReport.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index afa88d72..3cdaff78 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -937,6 +937,14 @@ namespace VEPROMS Volian.Base.Library.VlnSettings.TemporaryFolder + @"\searchresults.pdf"); if (args.SearchString != null) myReport.SearchString = args.SearchString; + if (!args.ReportTitle.Contains("Annotation")) + { + int annotationCount = 0; + foreach (ItemInfo itm in args.MyItemInfoList) + annotationCount += itm.ItemAnnotationCount; + if (annotationCount > 0) + myReport.ShowAnnotations = (MessageBox.Show("Show Annotations", "Include Annotations", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes); + } myReport.Build(); } diff --git a/PROMS/Volian.Print.Library/PDFReport.cs b/PROMS/Volian.Print.Library/PDFReport.cs index 4ec070a8..521e21c9 100644 --- a/PROMS/Volian.Print.Library/PDFReport.cs +++ b/PROMS/Volian.Print.Library/PDFReport.cs @@ -547,7 +547,7 @@ namespace Volian.Print.Library //else //AddCell(datatable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor)); AddCell(subTable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor)); - if (item.ItemAnnotationCount > 0) + if (ShowAnnotations && item.ItemAnnotationCount > 0) { foreach (AnnotationInfo ai in item.ItemAnnotations) {