Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }