public Image GetImage(bool large)
        {
            Image img = null;

            if (mi != null)
            {
                if (mi.IsDVDVolume)
                {
                    img = ImageProvider.GetShell32Icon(Shell32Icon.DvdDisk, large);
                }
                else
                {
                    switch (mi.MediaType.ToUpperInvariant())
                    {
                    case "URL":
                        img = ImageProvider.GetShell32Icon(Shell32Icon.URL, large);
                        break;

                    case "CDA":
                        img = ImageProvider.GetShell32Icon(Shell32Icon.CompactDisk, large);
                        break;

                    default:
                        img = ImageProvider.GetIcon(mi.Path, large);
                        break;
                    }
                }
            }

            if (img == null)
            {
                img = ImageProvider.GetShell32Icon(Shell32Icon.BlankFile, large);
            }

            return(img);
        }
Exemple #2
0
 private void LoadShell32Image(Shell32Icon shell32Icon)
 {
     ilItems.Images.Add(ImageProvider.GetShell32Icon(shell32Icon, false));
 }