C# Class BlackFox.Win32.Icons

Show file Open project: headswe/DreamEdit

Public Methods

Method Description
Extract ( string fileName, SystemIconSize size ) : List
Extract ( string fileName, List largeIcons, List smallIcons ) : void
ExtractEx ( string fileName, SystemIconSize size, int firstIconIndex, int iconCount ) : List
ExtractEx ( string fileName, List largeIcons, List smallIcons, int firstIconIndex, int iconCount ) : void
ExtractFromRegistryString ( string regString, SystemIconSize size ) : Icon
ExtractInformationsFromRegistryString ( string regString, string &fileName, int &index ) : void

Parse strings in registry who contains the name of the icon and the index of the icon an return both parts.

ExtractOne ( string fileName, int index, SystemIconSize size ) : Icon
ExtractOne ( string fileName, int index, Icon &largeIcon, Icon &smallIcon ) : void
IconFromExtension ( string extension, SystemIconSize size ) : Icon
IconFromExtensionShell ( string extension, SystemIconSize size ) : Icon
IconFromResource ( string resourceName ) : Icon

Private Methods

Method Description
ExtractIconEx ( [ lpszFile, int nIconIndex, IntPtr phIconLarge, IntPtr phIconSmall, int nIcons ) : int
GetIconsCountInFile ( string fileName ) : int

Get the number of icons in the specified file.

SHGetFileInfo ( string pszPath, int dwFileAttributes, SHFILEINFO &psfi, int cbFileInfo, FileInfoFlags uFlags ) : IntPtr

Method Details

Extract() public static method

public static Extract ( string fileName, SystemIconSize size ) : List
fileName string
size SystemIconSize
return List

Extract() public static method

public static Extract ( string fileName, List largeIcons, List smallIcons ) : void
fileName string
largeIcons List
smallIcons List
return void

ExtractEx() public static method

public static ExtractEx ( string fileName, SystemIconSize size, int firstIconIndex, int iconCount ) : List
fileName string
size SystemIconSize
firstIconIndex int
iconCount int
return List

ExtractEx() public static method

public static ExtractEx ( string fileName, List largeIcons, List smallIcons, int firstIconIndex, int iconCount ) : void
fileName string
largeIcons List
smallIcons List
firstIconIndex int
iconCount int
return void

ExtractFromRegistryString() public static method

public static ExtractFromRegistryString ( string regString, SystemIconSize size ) : Icon
regString string
size SystemIconSize
return System.Drawing.Icon

ExtractInformationsFromRegistryString() public static method

Parse strings in registry who contains the name of the icon and the index of the icon an return both parts.
public static ExtractInformationsFromRegistryString ( string regString, string &fileName, int &index ) : void
regString string The full string in the form "path,index" as found in registry.
fileName string The "path" part of the string.
index int The "index" part of the string.
return void

ExtractOne() public static method

public static ExtractOne ( string fileName, int index, SystemIconSize size ) : Icon
fileName string
index int
size SystemIconSize
return System.Drawing.Icon

ExtractOne() public static method

public static ExtractOne ( string fileName, int index, Icon &largeIcon, Icon &smallIcon ) : void
fileName string
index int
largeIcon System.Drawing.Icon
smallIcon System.Drawing.Icon
return void

IconFromExtension() public static method

public static IconFromExtension ( string extension, SystemIconSize size ) : Icon
extension string
size SystemIconSize
return System.Drawing.Icon

IconFromExtensionShell() public static method

public static IconFromExtensionShell ( string extension, SystemIconSize size ) : Icon
extension string
size SystemIconSize
return System.Drawing.Icon

IconFromResource() public static method

public static IconFromResource ( string resourceName ) : Icon
resourceName string
return System.Drawing.Icon