/// <summary> /// Constructs a new, default instance of the FileIcon /// class. Specify the filename and call GetInfo() /// to retrieve an icon. /// </summary> public FileIcon() { _flags = ShGetFileInfoConstants.ShgfiIcon | ShGetFileInfoConstants.ShgfiDisplayname | ShGetFileInfoConstants.ShgfiTypename | ShGetFileInfoConstants.ShgfiAttributes | ShGetFileInfoConstants.ShgfiExetype; }
public FileIcon(string fileName, ShGetFileInfoConstants flags) { FileName = fileName; Flags = flags; GetInfo(); }
/// <summary> /// Constructs a new instance of the FileIcon class /// and retrieves the information specified in the /// flags. /// </summary> /// <param name="fileName">The filename to get information /// for</param> /// <param name="flags">The flags to use when extracting the /// icon and other shell information.</param> public FileIcon(string fileName, FileIcon.ShGetFileInfoConstants flags) { this._fileName = fileName; this._flags = flags; GetInfo(); }