From 82263e28fb1cb1f8466c3ae1871fc15356dbb851 Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 26 Mar 2013 14:45:24 +0000 Subject: [PATCH] Limit Library Document lists to 20 items so that the tooltip and the dialog remain within the bounds of the screen. --- PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index a6889d2c..16ee919f 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -95,10 +95,17 @@ namespace VEPROMS.CSLA.Library sb.Append("None"); else { + int limit = 20; foreach (EntryInfo myEntry in DocumentEntries) { foreach (ItemInfo myItem in myEntry.MyContent.ContentItems) { + --limit; + if (limit < 0) + { + sb.Append(sep + "..."); + return sb.ToString(); + } ItemInfo proc = myItem.MyProcedure; sb.Append(sep + proc.DisplayNumber + " - " + proc.DisplayText); sep = "\r\n ";