public CTCBuilder(Configuration.GuidancePackage package, string basePath, RegistryKey regRoot, IEnumerable <IVsTemplate> templates) { this.guidancePackage = package; this.templates = templates; this.basePath = basePath; this.guidRecipeFrameworkPkg = typeof(RecipeManagerPackage).GUID; this.guidRecipeFrameworkPkgCmdSet = new Guid(guidancePackage.Guid); this.groupCounter = 0x10000; this.menuCounter = 0x20000; this.defaultParentCommand = new CommandID(ShellCmdDef.guidSHLMainMenu, ShellCmdDef.IDM_VS_MENU_TOOLS); this.ctcBitmap = new CTCBitmap(new CommandID(this.guidRecipeFrameworkPkgCmdSet, 100)); this.newGroups = new Dictionary <string, NewGroup>(7); this.menus = new Dictionary <string, MenuGroup>(7); this.placements = new Hashtable(7); this.buttons = new ArrayList(); this.visibilities = new ArrayList(); this.defaultIcon = new CommandID(this.guidRecipeFrameworkPkg, ShellCmdDef.bmpidGaxNoIcon); this.regRoot = regRoot; if (package.HostData != null && package.HostData.Icon != null) { this.defaultIcon = CreateBitmap(package.HostData.Icon); } }
private void Generate(CTCBitmap bitmap) { textWriter.Write(" "); Generate(bitmap.Command); textWriter.Write(" "); if (bitmap.Images.Count > 0) { for (int i = 0; i < bitmap.Images.Keys.Count; i++) { textWriter.Write("0x"); string key = bitmap.Images.Keys[i]; int keyAsNumber = int.Parse(key); textWriter.Write(keyAsNumber.ToString("X4")); if (i == bitmap.Images.Count - 1) { textWriter.WriteLine(";"); } else { textWriter.Write(","); } } } }