public Icon GetFileIcon(string fileName, Eto.IO.IconSize size) { ShellIcon.IconSize iconSize; switch (size) { default: case IconSize.Large: iconSize = ShellIcon.IconSize.Large; break; case IconSize.Small: iconSize = ShellIcon.IconSize.Small; break; } SD.Icon icon = ShellIcon.GetFileIcon(fileName, iconSize, false); return(new Icon(Widget.Generator, new IconHandler(icon))); }
public Icon GetFileIcon(string fileName, Eto.IO.IconSize size) { ShellIcon.IconSize iconSize; switch (size) { case IconSize.Large: iconSize = ShellIcon.IconSize.Large; break; case IconSize.Small: iconSize = ShellIcon.IconSize.Small; break; default: throw new NotSupportedException(); } using (var icon = ShellIcon.GetFileIcon(fileName, iconSize, false)) { return(new Icon(Widget.Generator, new IconHandler(icon))); } }
public Icon GetStaticIcon(Eto.IO.StaticIconType type, Eto.IO.IconSize size) { ShellIcon.IconSize iconSize; switch (size) { default: case IconSize.Large: iconSize = ShellIcon.IconSize.Large; break; case IconSize.Small: iconSize = ShellIcon.IconSize.Small; break; } ShellIcon.FolderType folderType; switch (type) { default: case StaticIconType.OpenDirectory: folderType = ShellIcon.FolderType.Open; break; case StaticIconType.CloseDirectory: folderType = ShellIcon.FolderType.Closed; break; } SD.Icon icon = ShellIcon.GetFolderIcon(iconSize, folderType); return(new Icon(Widget.Generator, new IconHandler(icon))); }
public Icon GetStaticIcon(Eto.IO.StaticIconType type, Eto.IO.IconSize size) { ShellIcon.IconSize iconSize; switch (size) { case IconSize.Large: iconSize = ShellIcon.IconSize.Large; break; case IconSize.Small: iconSize = ShellIcon.IconSize.Small; break; default: throw new NotSupportedException(); } ShellIcon.FolderType folderType; switch (type) { case StaticIconType.OpenDirectory: folderType = ShellIcon.FolderType.Open; break; case StaticIconType.CloseDirectory: folderType = ShellIcon.FolderType.Closed; break; default: throw new NotSupportedException(); } using (var icon = ShellIcon.GetFolderIcon(iconSize, folderType)) { return(new Icon(Widget.Generator, new IconHandler(icon))); } }
public Icon GetStaticIcon(Eto.IO.StaticIconType type, Eto.IO.IconSize size) { return(null); }
public Icon GetFileIcon(string fileName, Eto.IO.IconSize size) { return(null); }