Limit Library Document lists to 20 items so that the tooltip and the dialog remain within the bounds of the screen.

This commit is contained in:
Rich 2013-03-26 14:45:24 +00:00
parent 4b26543dca
commit 82263e28fb

View File

@ -95,10 +95,17 @@ namespace VEPROMS.CSLA.Library
sb.Append("None"); sb.Append("None");
else else
{ {
int limit = 20;
foreach (EntryInfo myEntry in DocumentEntries) foreach (EntryInfo myEntry in DocumentEntries)
{ {
foreach (ItemInfo myItem in myEntry.MyContent.ContentItems) foreach (ItemInfo myItem in myEntry.MyContent.ContentItems)
{ {
--limit;
if (limit < 0)
{
sb.Append(sep + "...");
return sb.ToString();
}
ItemInfo proc = myItem.MyProcedure; ItemInfo proc = myItem.MyProcedure;
sb.Append(sep + proc.DisplayNumber + " - " + proc.DisplayText); sb.Append(sep + proc.DisplayNumber + " - " + proc.DisplayText);
sep = "\r\n "; sep = "\r\n ";