Example #1
0
        public static GUIListItem CreateGuiListItem(string itemID, string itemTitle, string itemInfo1, string itemInfo2, string itemIcon, bool itemShaded, GUIListItem.ItemSelectedHandler callBackItemSelected, bool isFolder)
        {
            GUIListItem tmp = new GUIListItem(itemTitle);

            tmp.Label2   = itemInfo1;
            tmp.Label3   = itemInfo2;
            tmp.Path     = itemID;
            tmp.Shaded   = itemShaded;
            tmp.IsFolder = isFolder;
            if (File.Exists(itemIcon))
            {
                tmp.IconImage      = itemIcon;
                tmp.IconImageBig   = itemIcon;
                tmp.ThumbnailImage = itemIcon;
            }
            if (!isFolder)
            {
                tmp.OnItemSelected += callBackItemSelected;
            }
            return(tmp);
        }
Example #2
0
 public static GUIListItem CreateGuiListItem(string itemID, string itemTitle, string itemIcon, GUIListItem.ItemSelectedHandler callBackItemSelected)
 {
     return(CreateGuiListItem(itemID, itemTitle, string.Empty, string.Empty, itemIcon, false, callBackItemSelected, false));
 }