private void AddPages() { AddCommandButtons(); totalPages = (int)((TotalEntries.Count - 2) / amtPerPg) + 1; string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (TotalEntries.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "There are no files or directories to display."), false, false); } else { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 20); if (Help) { AddButton(130, 100, 2104, 2103, -101, GumpButtonType.Reply, 0); } AddHtml(140, 101, 520, 20, MC.ColorTextDir(defaultTextColor, String.Format("Directory: {0}", CropCoreDirectory(DirectoryPath))), false, false); SetPage(); } }