BrightIdeasSoftware.Utilities.ImagelistAdd.AddIconOfFileExt C# (CSharp) Метод

AddIconOfFileExt() публичный статический Метод

Extracts a file extension icon from the system and adds the icon to an imagelist.
public static AddIconOfFileExt ( string fileExtension, IconSizeZ IconSizeZ, bool selectedState, bool openState, bool linkOverlay, ImageList destinationImagelist ) : void
fileExtension string A file extension to extract the icon from.
IconSizeZ IconSizeZ The size to extract.
selectedState bool A flag to add the selected state of the icon.
openState bool A flag to add the open state of the icon.
linkOverlay bool A flag to add a shortcut overlay to the icon.
destinationImagelist System.Windows.Forms.ImageList An existing imagelist to add the extracted icon to.
Результат void
        public static void AddIconOfFileExt(string fileExtension, IconSizeZ IconSizeZ, bool selectedState, bool openState, bool linkOverlay, ImageList destinationImagelist)
        {
            uint uFlags = SHGFI_USEFILEATTRIBUTES |
                            ((IconSizeZ == IconSizeZ.Large) ? SHGFI_LARGEICON : 0) |
                            ((IconSizeZ == IconSizeZ.Small) ? SHGFI_SMALLICON : 0) |
                            ((IconSizeZ == IconSizeZ.Shell) ? SHGFI_SHELLICONSIZE : 0) |
                            ((selectedState) ? SHGFI_SELECTED : 0) |
                            ((openState) ? SHGFI_OPENICON : 0) |
                            ((linkOverlay) ? SHGFI_LINKOVERLAY : 0);

            Add(fileExtension.Insert(0, "."), destinationImagelist, uFlags);
        }

Same methods

ImagelistAdd::AddIconOfFileExt ( string fileExtension, ImageList destinationImagelist ) : void