string GetMenuItemText(int index, string filepath, string displaypath) { GetMenuItemTextDelegate delegateGetMenuItemText = GetMenuItemTextHandler; if (delegateGetMenuItemText != null) { return(delegateGetMenuItemText(index, filepath)); } string shortPath = ShortenPathname(displaypath, MaxPathLength); return(String.Format("{0}: {1}", index, shortPath)); }
string GetMenuItemText(int index, string filepath, string displaypath) { GetMenuItemTextDelegate delegateGetMenuItemText = GetMenuItemTextHandler; if (delegateGetMenuItemText != null) { return(delegateGetMenuItemText(index, filepath)); } string format = (index < 10 ? MenuItemFormatOneToNine : MenuItemFormatTenPlus); string shortPath = ShortenPathname(displaypath, MaxPathLength); return(String.Format(format, index, filepath, shortPath)); }