public static string GetIdentForType(IcnsType type) { switch (type) { case IcnsType.icp4_16x16: return("icp4"); case IcnsType.icp5_32x32: return("icp5"); case IcnsType.icp6_64x64: return("icp6"); case IcnsType.ic07_128x128: return("ic07"); case IcnsType.ic08_256x256: return("ic08"); case IcnsType.ic09_512x512: return("ic09"); case IcnsType.ic10_1024x1024: return("ic10"); case IcnsType.ic11_16x16x2: return("ic11"); case IcnsType.ic12_32x32x2: return("ic12"); case IcnsType.ic13_128x128x2: return("ic13"); case IcnsType.ic14_256x256x2: return("ic14"); } throw new ArgumentException("Invalid icons type!", "type"); }
public static Size GetSizeForType(IcnsType type) { switch (type) { case IcnsType.icp4_16x16: return(new Size(16, 16)); case IcnsType.icp5_32x32: return(new Size(32, 32)); case IcnsType.icp6_64x64: return(new Size(64, 64)); case IcnsType.ic07_128x128: return(new Size(128, 128)); case IcnsType.ic08_256x256: return(new Size(256, 256)); case IcnsType.ic09_512x512: return(new Size(512, 512)); case IcnsType.ic10_1024x1024: return(new Size(1024, 1024)); case IcnsType.ic11_16x16x2: return(new Size(32, 32)); case IcnsType.ic12_32x32x2: return(new Size(64, 64)); case IcnsType.ic13_128x128x2: return(new Size(256, 256)); case IcnsType.ic14_256x256x2: return(new Size(512, 512)); } throw new ArgumentException("Invalid icons type!", "type"); }
public IcnsIcon AddImage(Image image, IcnsType type) { var ret = new IcnsIcon(image, type); Icons.Add(ret); return(ret); }
public IcnsIcon AddImage(string filename, IcnsType type) { using (var image = Image.FromFile(filename)) { var newImage = (Image)image.Clone(); var ret = new IcnsIcon(newImage, type); Icons.Add(ret); return(ret); } }
internal IcnsIcon(IcnsType type, int fileSize) : this() { Type = type; FileSize = fileSize; }
public IcnsIcon(Image image, IcnsType type) : this() { Image = image; Type = type; }