Beispiel #1
0
 public static Icon GetIconForExtension(string extension)
 {
     if (!extensionIcons.ContainsKey(extension))
     {
         Icon ic = ExtendedFileInfo.GetExtensionIcon(extension, true);
         if (ic == null)
         {
             throw new NullReferenceException("Icon for extension: " + extension);
         }
         extensionIcons[extension] = ic;
     }
     return(extensionIcons[extension]);
 }