public static ApplicationIcon TryCreate(Win32Resources resources, string filenameNoExt, FilenameCreator filenameCreator) { if (resources == null) { return(null); } var dir = resources.Find(new ResourceName(RT_GROUP_ICON)); if (dir == null || dir.Directories.Count == 0) { return(null); } dir = dir.Directories[0]; if (dir.Data.Count == 0) { return(null); } var iconDir = resources.Find(new ResourceName(RT_ICON)); if (iconDir == null) { return(null); } var iconData = TryCreateIcon(dir.Data[0].Data, iconDir); if (iconData == null) { return(null); } return(new ApplicationIcon(filenameCreator.CreateName(filenameNoExt + ".ico"), iconData)); }
private void Add(Win32Resources vtf) { if (vtf == null) { return; } Add(vtf.Root); }
void Add(Win32Resources vtf) { if (vtf is null) { return; } Add(vtf.Root); }
public static ApplicationManifest TryCreate(Win32Resources resources, FilenameCreator filenameCreator) { if (resources == null) { return(null); } var dir = resources.Find(new ResourceName(RT_MANIFEST)); if (dir == null || dir.Directories.Count == 0) { return(null); } dir = dir.Directories[0]; if (dir.Data.Count == 0) { return(null); } var reader = dir.Data[0].CreateReader(); return(new ApplicationManifest(filenameCreator.CreateName("app.manifest"), ref reader)); }
/// <summary> /// Constructor /// </summary> /// <param name="win32Resources">Win32 resources</param> public Win32ResourcesChunk(Win32Resources win32Resources) { this.win32Resources = win32Resources; }
void Add(Win32Resources vtf) { if (vtf == null) return; Add(vtf.Root); }
private void ProcessWin32Resources(Win32Resources resources) => ProcessWin32Resources(resources.Root);