public static Bitmap LoadImageFromResource(string resourceName) { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("HCMIS.Security.UserManagement.Properties.Resources", typeof(Resources).Assembly); var bitmap = resourceManager.GetObject(resourceName.Trim(),null); if (bitmap == null) return null; var icon = new Bitmap((Bitmap)bitmap, new Size(24,24)); return icon; }
private static Image GetImageFromResource(string path) { if (String.IsNullOrEmpty(path)) return null; string[] parts = path.Split(';'); if (parts.Length != 3) return null; AssemblyName name = new AssemblyName(parts[0]); var assembly = Assembly.Load(name); if (assembly == null) return null; var manager = new global::System.Resources.ResourceManager(parts[1], assembly); manager.IgnoreCase = true; var bitmap = (Bitmap)manager.GetObject(parts[2]); return bitmap; }
public static Bitmap LoadImageFromResource(string resourceName,int width, int height) { try { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("HCMIS.Desktop.Properties.Resources", typeof(Resources).Assembly); if (resourceName == null) return null; var bitmap = resourceManager.GetObject(resourceName.Trim(), null); if (bitmap == null) return null; var icon = new Bitmap((Bitmap)bitmap, new Size(width, height)); return icon; } catch { return null; } }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Sawczyn.EFDesigner.EFModel.EFModelDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Sawczyn.EFDesigner.EFModel.ModelClassToolboxItem": // Add ModelClass shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.ModelClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ModelClassToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ModelClassToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ModelClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ModelClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.EFDesigner.EFModel.ModelClass.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute("ModelClass"), // HACK : MEXEDGE new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ModelClassFilterString) }); break; case "Sawczyn.EFDesigner.EFModel.UnidirectionalAssociationToolboxItem": // Add UnidirectionalAssociation connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.UnidirectionalAssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("UnidirectionalAssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("UnidirectionalAssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectUnidirectionalAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("UnidirectionalAssociationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(UnidirectionalAssociationFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("UnidirectionalAssociation"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.BidirectionalAssociationToolboxItem": // Add BidirectionalAssociation connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.BidirectionalAssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BidirectionalAssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BidirectionalAssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectBidirectionalAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("BidirectionalAssociationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(BidirectionalAssociationFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("BidirectionalAssociation"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.GeneralizationToolboxItem": // Add Generalization connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.GeneralizationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("GeneralizationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("GeneralizationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "GeneralizationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("GeneralizationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(GeneralizationFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("Generalization"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.CommentToolboxItem": // Add Comment shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.CommentToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.EFDesigner.EFModel.Comment.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute("Comment"), // HACK : MEXEDGE new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CommentFilterString) }); break; case "Sawczyn.EFDesigner.EFModel.CommentLinkToolboxItem": // Add CommentLink connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.CommentLinkToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentLinkToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentLinkToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentsReferenceDesignElementsF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentLinkToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CommentLinkFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("CommentLink"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.EnumerationToolboxItem": // Add Enumeration shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.EnumerationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EnumerationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EnumerationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ModelEnumF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("EnumerationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.EFDesigner.EFModel.ModelEnum.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute("Enumeration"), // HACK : MEXEDGE new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(EnumerationFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Ultramarine.Generators.Language.GeneratorLanguageDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Ultramarine.Generators.Language.ConnectedWithRelationshipToolboxItem": // Add ConnectedWithRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.ConnectedWithRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConnectedWithRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConnectedWithRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectExampleRelationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ConnectedWithRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ConnectedWithRelationshipFilterString) }); break; case "Ultramarine.Generators.Language.BuildProjectToolboxItem": // Add BuildProject shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.BuildProjectToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BuildProjectToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BuildProjectToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "BuildProject", // F1 help keyword for the toolbox item. resourceManager.GetString("BuildProjectToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.BuildProject.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.CreateFolderToolboxItem": // Add CreateFolder shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.CreateFolderToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CreateFolderToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CreateFolderToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateFolder", // F1 help keyword for the toolbox item. resourceManager.GetString("CreateFolderToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.CreateFolder.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.CreateProjectItemToolboxItem": // Add CreateProjectItem shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.CreateProjectItemToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CreateProjectItemToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CreateProjectItemToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateProjectItem", // F1 help keyword for the toolbox item. resourceManager.GetString("CreateProjectItemToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.CreateProjectItem.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.LoadCodeElementToolboxItem": // Add LoadCodeElement shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.LoadCodeElementToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("LoadCodeElementToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("LoadCodeElementToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateExampleClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("LoadCodeElementToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.LoadCodeElement.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.LoadProjectItemToolboxItem": // Add LoadProjectItem shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.LoadProjectItemToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("LoadProjectItemToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("LoadProjectItemToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "LoadProjectItem", // F1 help keyword for the toolbox item. resourceManager.GetString("LoadProjectItemToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.LoadProjectItem.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.ReadPropertyToolboxItem": // Add ReadProperty shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.ReadPropertyToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ReadPropertyToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ReadPropertyToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ReadProperty", // F1 help keyword for the toolbox item. resourceManager.GetString("ReadPropertyToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.ReadProperty.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.SetVariableToolboxItem": // Add SetVariable shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.SetVariableToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("SetVariableToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SetVariableToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "SetVariable", // F1 help keyword for the toolbox item. resourceManager.GetString("SetVariableToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.SetVariable.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.IteratorToolboxItem": // Add Iterator shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.IteratorToolboxItem", // Unique identifier (non-localized) for the toolbox item. 9, // Position relative to other items in the same toolbox tab. resourceManager.GetString("IteratorToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IteratorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Iterator", // F1 help keyword for the toolbox item. resourceManager.GetString("IteratorToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.Iterator.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.TextTransformationToolboxItem": // Add TextTransformation shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.TextTransformationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 10, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TextTransformationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TextTransformationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TextTransformation", // F1 help keyword for the toolbox item. resourceManager.GetString("TextTransformationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.TextTransformation.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Ultramarine.Generators.Language.ImporterToolboxItem": // Add Importer shape tool. result = new DslDesign::ModelingToolboxItem( "Ultramarine.Generators.Language.ImporterToolboxItem", // Unique identifier (non-localized) for the toolbox item. 11, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ImporterToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ImporterToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ultramarine.Generators.Language.Generator LanguageToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Generator LanguageToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Importer", // F1 help keyword for the toolbox item. resourceManager.GetString("ImporterToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ultramarine.Generators.Language.Importer.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "SchneiderElectricDMS.PowerFunctionsReportDSL.ExternalTypeToolboxItem": // Add ExternalType shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.ExternalTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ExternalTypeToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ExternalTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ExternalType", // F1 help keyword for the toolbox item. resourceManager.GetString("ExternalTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.ExternalType.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentToolboxItem": // Add Comment shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Comment", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.Comment.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentRelationshipToolboxItem": // Add CommentRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CommentRelationshipFilterString) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.TabToolboxItem": // Add Tab shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.TabToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TabToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TabToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Tab", // F1 help keyword for the toolbox item. resourceManager.GetString("TabToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.Tab.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.DataGridToolboxItem": // Add DataGrid shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.DataGridToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("DataGridToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("DataGridToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "DataGrid", // F1 help keyword for the toolbox item. resourceManager.GetString("DataGridToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.DataGrid.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.TabTabReferenceToolboxItem": // Add TabTabReference connector tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.TabTabReferenceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TabTabReferenceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TabTabReferenceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TabTabReference", // F1 help keyword for the toolbox item. resourceManager.GetString("TabTabReferenceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(TabTabReferenceFilterString) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.TabDataGridReferenceToolboxItem": // Add TabDataGridReference connector tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.TabDataGridReferenceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TabDataGridReferenceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TabDataGridReferenceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TabDataGridReference", // F1 help keyword for the toolbox item. resourceManager.GetString("TabDataGridReferenceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(TabDataGridReferenceFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Microsoft.Practices.ServiceFactory.HostDesigner.HostDesignerDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Microsoft.Practices.ServiceFactory.HostDesigner.HostApplicationToolboxItem": // Add HostApplication shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.HostApplicationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("HostApplicationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("HostApplicationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "HostApplication", // F1 help keyword for the toolbox item. resourceManager.GetString("HostApplicationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.HostApplication.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(HostApplicationFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ServiceToolboxItem": // Add Service shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ServiceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ServiceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ServiceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Service", // F1 help keyword for the toolbox item. resourceManager.GetString("ServiceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.ServiceReference.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ServiceFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.EndpointToolboxItem": // Add Endpoint shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.EndpointToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EndpointToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EndpointToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Endpoint", // F1 help keyword for the toolbox item. resourceManager.GetString("EndpointToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.Endpoint.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(EndpointFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ClientApplicationToolboxItem": // Add ClientApplication shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ClientApplicationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClientApplicationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClientApplicationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClientApplication", // F1 help keyword for the toolbox item. resourceManager.GetString("ClientApplicationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.ClientApplication.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ClientApplicationFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyToolboxItem": // Add Proxy shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProxyToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProxyToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Proxy", // F1 help keyword for the toolbox item. resourceManager.GetString("ProxyToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.Proxy.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ProxyFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyEndpointConnectionToolToolboxItem": // Add ProxyEndpointConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyEndpointConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProxyEndpointConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProxyEndpointConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ProxyEndpointConnectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ProxyEndpointConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ProxyEndpointConnectionToolFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.MBRDCMDMIDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClaseToolToolboxItem": // Add ClaseTool shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClaseToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClaseToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClaseToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClasesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ClasesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClaseTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ClaseToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClasePrincipal.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAsociacionToolboxItem": // Add RelacionAsociacion connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAsociacionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAsociacionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAsociacionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAsociacion", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAsociacionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAsociacionFilterString) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionInclusivaToolboxItem": // Add RelacionAgregacionInclusiva connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionInclusivaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAgregacionInclusivaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAgregacionInclusivaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAgregacionInclusiva", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAgregacionInclusivaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAgregacionInclusivaFilterString) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionRelacionalToolboxItem": // Add RelacionAgregacionRelacional connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionRelacionalToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAgregacionRelacionalToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAgregacionRelacionalToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAgregacionRelacional", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAgregacionRelacionalToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAgregacionRelacionalFilterString) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionHerenciaToolboxItem": // Add RelacionHerencia connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionHerenciaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionHerenciaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionHerenciaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionHerencia", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionHerenciaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionHerenciaFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Microsoft.Data.Entity.Design.Package.EntityToolToolboxItem": // Add EntityTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Data.Entity.Design.Package.EntityToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EntityToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Data.Entity.Design.Package.Entity FrameworkToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Entity FrameworkToolboxTab", resourceCulture), // Localized display name for the toolbox tab. string.Empty, // no F1 help keyword for the toolbox item. resourceManager.GetString("EntityToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Microsoft.Data.Entity.Design.Package.AssociationToolToolboxItem": // Add AssociationTool connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Data.Entity.Design.Package.AssociationToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AssociationToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AssociationToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Data.Entity.Design.Package.Entity FrameworkToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Entity FrameworkToolboxTab", resourceCulture), // Localized display name for the toolbox tab. string.Empty, // no F1 help keyword for the toolbox item. resourceManager.GetString("AssociationToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(AssociationToolFilterString) }); break; case "Microsoft.Data.Entity.Design.Package.InheritanceToolToolboxItem": // Add InheritanceTool connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Data.Entity.Design.Package.InheritanceToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("InheritanceToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InheritanceToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Data.Entity.Design.Package.Entity FrameworkToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Entity FrameworkToolboxTab", resourceCulture), // Localized display name for the toolbox tab. string.Empty, // no F1 help keyword for the toolbox item. resourceManager.GetString("InheritanceToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(InheritanceToolFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::JA.Attack.AttackDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "JA.Attack.FlowToolToolboxItem": // Add FlowTool connector tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.FlowToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FlowToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FlowToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "FlowTool", // F1 help keyword for the toolbox item. resourceManager.GetString("FlowToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(FlowToolFilterString) }); break; case "JA.Attack.TaskToolToolboxItem": // Add TaskTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.TaskToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TaskToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TaskToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TaskTool", // F1 help keyword for the toolbox item. resourceManager.GetString("TaskToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.Task.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.StateToolToolboxItem": // Add StateTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.StateToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StateToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StateToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "StateTool", // F1 help keyword for the toolbox item. resourceManager.GetString("StateToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.State.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.SyncToolToolboxItem": // Add SyncTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.SyncToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("SyncToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SyncToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "SyncTool", // F1 help keyword for the toolbox item. resourceManager.GetString("SyncToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.Synchronisation.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.StartToolToolboxItem": // Add StartTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.StartToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StartToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StartToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "StartTool", // F1 help keyword for the toolbox item. resourceManager.GetString("StartToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.StartPoint.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.EndToolToolboxItem": // Add EndTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.EndToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EndToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EndToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "EndTool", // F1 help keyword for the toolbox item. resourceManager.GetString("EndToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.EndPoint.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.MergeToolToolboxItem": // Add MergeTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.MergeToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MergeToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MergeToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MergeTool", // F1 help keyword for the toolbox item. resourceManager.GetString("MergeToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.MergeBranch.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::UPM_IPS.DNRDPVSQGProyectoMDD.DNRDPVSQGProyectoMDDDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaPToolboxToolboxItem": // Add VentanaPToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaPToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("VentanaPToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("VentanaPToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.VentanasToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("VentanasToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "VentanaPToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("VentanaPToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.VentanaPrincipal.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaSToolboxToolboxItem": // Add VentanaSToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaSToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("VentanaSToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("VentanaSToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.VentanasToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("VentanasToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "VentanaSToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("VentanaSToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.VentanaSecundaria.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.MenuToolboxToolboxItem": // Add MenuToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.MenuToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MenuToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MenuToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.ContenidoToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ContenidoToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MenuToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("MenuToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.Menu.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.ItemToolboxToolboxItem": // Add ItemToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.ItemToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ItemToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ItemToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.ContenidoToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ContenidoToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ItemToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("ItemToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.Item.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.BotonToolboxToolboxItem": // Add BotonToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.BotonToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BotonToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BotonToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.ContenidoToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ContenidoToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "BotonToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("BotonToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.Boton.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.FinToolboxToolboxItem": // Add FinToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.FinToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FinToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FinToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.Estados y relacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Estados y relacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "FinToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("FinToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.EstadoFin.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.RelacionToolboxToolboxItem": // Add RelacionToolbox connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.RelacionToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.Estados y relacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Estados y relacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionToolboxFilterString) }); break; default: break; } // end switch return(result); }
private List<MenuInfo> GetRibbonMenuTags() { List<MenuInfo> tags = new List<MenuInfo>(); foreach (var downloader in Downloader.GetAllDownloaders()) { var attributes = downloader.GetType().GetCustomAttributes(typeof(DownloaderAttribute),true); if (attributes != null) { foreach (DownloaderAttribute att in attributes) { var tag = tags.Find(p => p.TagName == att.MenuGroup); if(tag == null){ tag = new MenuInfo() ; tags.Add(tag); } tag.TagName = att.MenuGroup; global::System.Resources.ResourceManager resourceMan = new global::System.Resources.ResourceManager("ComicDownloader.Properties.Resources", typeof(Resources).Assembly); RibbonButton button = new RibbonButton() { Image = resourceMan.GetObject(att.Image32) as Image, Tag = downloader, //Text = downloader.Name }; button.Click += new EventHandler(delegate(object sender, EventArgs e) { var dl = ((RibbonButton)sender).Tag as Downloader; AddChildForm(dl.Name, dl); }); tag.Downloaders.Add(button); } } } return tags; }
/// <summary> /// Constructs a new ConfigurationSectionDesignerExplorerBase. /// </summary> protected ConfigurationSectionDesignerExplorerBase(global::System.IServiceProvider serviceProvider) : base(serviceProvider) { // Adds custom tree node settings... global::System.Resources.ResourceManager resourceManager = global::ConfigurationSectionDesigner.ConfigurationSectionDesignerDomainModel.SingletonResourceManager; this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.ConfigurationElement.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationElementExplorerImage")), true); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.ConfigurationElementCollection.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationElementCollectionExplorerImage")), true); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.ConfigurationSection.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationSectionExplorerImage")), true); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.EnumerationLiteral.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EnumerationLiteralExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.AttributeProperty.DomainClassId, null, false); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.ElementProperty.DomainClassId, null, false); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.EnumeratedType.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EnumeratedTypeExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.ExternalType.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ExternalTypeExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.ConfigurationSectionGroup.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationSectionGroupExplorerImage")), true); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.ConfigurationSectionModel.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationSectionModelExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.PropertyValidators.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("PropertyValidatorsExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.PropertyValidator.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("PropertyValidatorExplorerImage")), true); this.AddExplorerNodeCustomSetting(global::ConfigurationSectionDesigner.CustomTypeConverter.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CustomTypeConverterExplorerImage")), false); }
/// <summary> /// Constructs a new nHydrateExplorerBase. /// </summary> protected nHydrateExplorerBase(global::System.IServiceProvider serviceProvider) : base(serviceProvider) { try { // Adds hidden path to hide elements from the explorer this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasStaticDatum.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasRelationFields.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.CompositeHasFields.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityReferencesModules.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasRelationModules.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasRelationModules.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasComposites.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasIndexModules.DomainClassId }); } catch (global::System.InvalidOperationException) { // Each hidden path specified needs to have odd number of guid entries. The entries will alternative between // DomainRelationshipID and DomainClassID. The guids list should also start out with a DomainRelationshipID. // This exception will be swallowed... global::System.Diagnostics.Debug.Fail("Each hidden path specified needs to have odd number of guid entries.\r\nPlease update the HiddenNodes section under ExplorerBehavior in the DSL file\r\nso the Model Explorer can hide element properly."); } // Adds custom tree node settings... global::System.Resources.ResourceManager resourceManager = global::nHydrate.Dsl.nHydrateDomainModel.SingletonResourceManager; this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Entity.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Field.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.View.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ViewExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.StoredProcedureField.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StoredProcedureFieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.StoredProcedure.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StoredProcedureExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.StoredProcedureParameter.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StoredProcedureParameterExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.ViewField.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ViewFieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Composite.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CompositeExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.EntityMetadata.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityMetadataExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.FieldMetadata.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FieldMetadataExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.nHydrateModel.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("nHydrateModelExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Function.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.FunctionParameter.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionParameterExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.FunctionField.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionFieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Index.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IndexExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.IndexColumn.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IndexColumnExplorerImage")), false); // Add a call back to provide ModelElementTreeNode TreeNode name in the Model Explorer this.GetModelElementDisplayNameEventHandler = new DslShell.GetModelElementDisplayNameEventHandler(GetModelElementDisplayName); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1DomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "ce.GEB_NGN_PCR_Practica1.VentanaToolboxItem": // Add Ventana shape tool. result = new DslDesign::ModelingToolboxItem( "ce.GEB_NGN_PCR_Practica1.VentanaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("VentanaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("VentanaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("GEB_NGN_PCR_Practica1ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Ventana", // F1 help keyword for the toolbox item. resourceManager.GetString("VentanaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ce.GEB_NGN_PCR_Practica1.Ventana.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "ce.GEB_NGN_PCR_Practica1.MenuToolboxItem": // Add Menu shape tool. result = new DslDesign::ModelingToolboxItem( "ce.GEB_NGN_PCR_Practica1.MenuToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MenuToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MenuToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("GEB_NGN_PCR_Practica1ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Menu", // F1 help keyword for the toolbox item. resourceManager.GetString("MenuToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ce.GEB_NGN_PCR_Practica1.Menu.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "ce.GEB_NGN_PCR_Practica1.MenuItemToolboxItem": // Add MenuItem shape tool. result = new DslDesign::ModelingToolboxItem( "ce.GEB_NGN_PCR_Practica1.MenuItemToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MenuItemToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MenuItemToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("GEB_NGN_PCR_Practica1ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MenuItem", // F1 help keyword for the toolbox item. resourceManager.GetString("MenuItemToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ce.GEB_NGN_PCR_Practica1.MenuItem.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Castle.ActiveWriter.ActiveWriterDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Castle.ActiveWriter.ClassToolboxItem": // Add Class shape tool. result = new DslDesign::ModelingToolboxItem( "Castle.ActiveWriter.ClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Castle.ActiveWriter.ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Castle.ActiveWriter.ModelClass.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Castle.ActiveWriter.ManyToOneRelationshipToolboxItem": // Add ManyToOneRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "Castle.ActiveWriter.ManyToOneRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ManyToOneRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ManyToOneRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Castle.ActiveWriter.ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectRelationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ManyToOneRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ManyToOneRelationshipFilterString) }); break; case "Castle.ActiveWriter.ManyToManyRelationshipToolboxItem": // Add ManyToManyRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "Castle.ActiveWriter.ManyToManyRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ManyToManyRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ManyToManyRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Castle.ActiveWriter.ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ManyToManyRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("ManyToManyRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ManyToManyRelationshipFilterString) }); break; case "Castle.ActiveWriter.OneToOneRelationshipToolboxItem": // Add OneToOneRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "Castle.ActiveWriter.OneToOneRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("OneToOneRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("OneToOneRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Castle.ActiveWriter.ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "OneToOneRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("OneToOneRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(OneToOneRelationshipFilterString) }); break; case "Castle.ActiveWriter.NestedClassToolboxItem": // Add NestedClass shape tool. result = new DslDesign::ModelingToolboxItem( "Castle.ActiveWriter.NestedClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("NestedClassToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("NestedClassToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Castle.ActiveWriter.ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "NestedClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("NestedClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Castle.ActiveWriter.NestedClass.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Castle.ActiveWriter.NestedRelationshipToolboxItem": // Add NestedRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "Castle.ActiveWriter.NestedRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("NestedRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("NestedRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Castle.ActiveWriter.ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "NestedRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("NestedRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(NestedRelationshipFilterString) }); break; case "Castle.ActiveWriter.InheritanceRelationshipToolboxItem": // Add InheritanceRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "Castle.ActiveWriter.InheritanceRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("InheritanceRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InheritanceRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Castle.ActiveWriter.ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "InheritanceRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("InheritanceRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(InheritanceRelationshipFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns a list of toolbox items for use with this DSL. /// </summary> public virtual global::System.Collections.Generic.IList <DslDesign::ModelingToolboxItem> CreateToolboxItems() { global::System.Collections.Generic.List <DslDesign::ModelingToolboxItem> toolboxItems = new global::System.Collections.Generic.List <DslDesign::ModelingToolboxItem>(); // Create store and load domain models. using (DslModeling::Store store = new DslModeling::Store(this.ServiceProvider)) { store.LoadDomainModels(typeof(DslDiagrams::CoreDesignSurfaceDomainModel), typeof(global::Altinoren.ActiveWriter.ActiveWriterDomainModel)); global::System.Resources.ResourceManager resourceManager = global::Altinoren.ActiveWriter.ActiveWriterDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; // Open transaction so we can create model elements corresponding to toolbox items. using (DslModeling::Transaction t = store.TransactionManager.BeginTransaction("CreateToolboxItems")) { // Add Class shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Altinoren.ActiveWriter.ModelClass.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add ManyToOneRelationship connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ManyToOneRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ManyToOneRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ManyToOneRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectRelationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ManyToOneRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ManyToOneRelationshipFilterString) })); // Add ManyToManyRelationship connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ManyToManyRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ManyToManyRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ManyToManyRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ManyToManyRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("ManyToManyRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ManyToManyRelationshipFilterString) })); // Add OneToOneRelationship connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "OneToOneRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("OneToOneRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("OneToOneRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "OneToOneRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("OneToOneRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(OneToOneRelationshipFilterString) })); // Add NestedClass shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "NestedClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("NestedClassToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("NestedClassToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "NestedClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("NestedClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Altinoren.ActiveWriter.NestedClass.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add NestedRelationship connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "NestedRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("NestedRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("NestedRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ActiveWriterToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ActiveWriterToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "NestedRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("NestedRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(NestedRelationshipFilterString) })); t.Rollback(); } } return(toolboxItems); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::CQRSAzure.CQRSdsl.Dsl.CQRSdslDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "CQRSAzure.CQRSdsl.Dsl.AggregateToolToolboxItem": // Add AggregateTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.AggregateToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AggregateToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AggregateToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Aggregate", // F1 help keyword for the toolbox item. resourceManager.GetString("AggregateToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.AggregateIdentifier.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.EventDefinitionToolToolboxItem": // Add EventDefinitionTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.EventDefinitionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EventDefinitionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EventDefinitionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "EventDefinitionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("EventDefinitionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.EventDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ProjectionToolToolboxItem": // Add ProjectionTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ProjectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProjectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProjectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ProjectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ProjectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.ProjectionDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.CommandToolToolboxItem": // Add CommandTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.CommandToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommandToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommandToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommandTool", // F1 help keyword for the toolbox item. resourceManager.GetString("CommandToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.CommandDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.QueryToolToolboxItem": // Add QueryTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.QueryToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("QueryToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("QueryToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "QueryTool", // F1 help keyword for the toolbox item. resourceManager.GetString("QueryToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.QueryDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ProjectionEventConnectionToolToolboxItem": // Add ProjectionEventConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ProjectionEventConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProjectionEventConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProjectionEventConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ProjectionEvent", // F1 help keyword for the toolbox item. resourceManager.GetString("ProjectionEventConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ProjectionEventConnectionToolFilterString) }); break; case "CQRSAzure.CQRSdsl.Dsl.AggregateParenthoodConnectionToolToolboxItem": // Add AggregateParenthoodConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.AggregateParenthoodConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AggregateParenthoodConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AggregateParenthoodConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AggregateParenthoodConnectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("AggregateParenthoodConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(AggregateParenthoodConnectionToolFilterString) }); break; case "CQRSAzure.CQRSdsl.Dsl.IdentityGroupToolToolboxItem": // Add IdentityGroupTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.IdentityGroupToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("IdentityGroupToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IdentityGroupToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "IdentityGroup", // F1 help keyword for the toolbox item. resourceManager.GetString("IdentityGroupToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.IdentityGroup.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ClassifierToolToolboxItem": // Add ClassifierTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ClassifierToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 9, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassifierToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassifierToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClassifierTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassifierToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.Classifier.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ClassifierEventConnectionToolToolboxItem": // Add ClassifierEventConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ClassifierEventConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 10, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassifierEventConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassifierEventConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClassifierEventConnection", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassifierEventConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ClassifierEventConnectionToolFilterString) }); break; case "CQRSAzure.CQRSdsl.Dsl.ClassifierProjectionConnectionToolToolboxItem": // Add ClassifierProjectionConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ClassifierProjectionConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 11, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassifierProjectionConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassifierProjectionConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClassifierProjectionConnectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassifierProjectionConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ClassifierProjectionConnectionToolFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.DRQPJPFMAMPracticaDSLToolsDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadToolboxItem": // Add Entidad shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EntidadToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntidadToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EntidadesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateExampleClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("EntidadToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.Entidad.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionToolboxItem": // Add Relacion shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EntidadesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Relacion", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relacion.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionAtributoToolboxItem": // Add RelacionAtributo connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionAtributoToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAtributoToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAtributoToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relaciones (Conectores)ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Relaciones (Conectores)ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAtributo", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAtributoToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAtributoFilterString) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadIzquierdaToolboxItem": // Add RelacionEntidadIzquierda connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadIzquierdaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionEntidadIzquierdaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionEntidadIzquierdaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relaciones (Conectores)ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Relaciones (Conectores)ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionEntidadIzquierda", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionEntidadIzquierdaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionEntidadIzquierdaFilterString) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadDerechaToolboxItem": // Add RelacionEntidadDerecha connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadDerechaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionEntidadDerechaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionEntidadDerechaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relaciones (Conectores)ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Relaciones (Conectores)ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionEntidadDerecha", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionEntidadDerechaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionEntidadDerechaFilterString) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.ClavePrimariaToolboxItem": // Add ClavePrimaria shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.ClavePrimariaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClavePrimariaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClavePrimariaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributosToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AtributosToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClavePrimaria", // F1 help keyword for the toolbox item. resourceManager.GetString("ClavePrimariaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.ClavePrimaria.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoEntidadToolboxItem": // Add AtributoEntidad shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoEntidadToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AtributoEntidadToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AtributoEntidadToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributosToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AtributosToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AtributoEntidad", // F1 help keyword for the toolbox item. resourceManager.GetString("AtributoEntidadToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoEntidad.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoRelacionToolboxItem": // Add AtributoRelacion shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoRelacionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AtributoRelacionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AtributoRelacionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributosToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AtributosToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AtributoRelacion", // F1 help keyword for the toolbox item. resourceManager.GetString("AtributoRelacionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoRelacion.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::BotFrameworkDsl.BotFrameworkDslDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "BotFrameworkDsl.ConversationFlowToolboxItem": // Add ConversationFlow connector tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.ConversationFlowToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConversationFlowToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConversationFlowToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectExampleRelationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ConversationFlowToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ConversationFlowFilterString) }); break; case "BotFrameworkDsl.StartToolboxItem": // Add Start shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.StartToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StartToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StartToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Start", // F1 help keyword for the toolbox item. resourceManager.GetString("StartToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.Start.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "BotFrameworkDsl.EndToolboxItem": // Add End shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.EndToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EndToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EndToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "End", // F1 help keyword for the toolbox item. resourceManager.GetString("EndToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.End.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "BotFrameworkDsl.SpeakToolboxItem": // Add Speak shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.SpeakToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("SpeakToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SpeakToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Speak", // F1 help keyword for the toolbox item. resourceManager.GetString("SpeakToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.Speak.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "BotFrameworkDsl.ListenToolboxItem": // Add Listen shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.ListenToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ListenToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ListenToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Listen", // F1 help keyword for the toolbox item. resourceManager.GetString("ListenToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.Listen.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
private void InitializeComponent() { this.components = new global::System.ComponentModel.Container(); global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager(typeof(global::HeroesOpTool.HelpViewer)); this.TViewHelpIndex = new global::System.Windows.Forms.TreeView(); this.TreeIcons = new global::System.Windows.Forms.ImageList(this.components); this.splitter1 = new global::System.Windows.Forms.Splitter(); this.HtmlHelpContent = new global::AxSHDocVw.AxWebBrowser(); ((global::System.ComponentModel.ISupportInitialize) this.HtmlHelpContent).BeginInit(); base.SuspendLayout(); this.TViewHelpIndex.Dock = global::System.Windows.Forms.DockStyle.Left; this.TViewHelpIndex.HideSelection = false; this.TViewHelpIndex.ImageIndex = 3; this.TViewHelpIndex.ImageList = this.TreeIcons; this.TViewHelpIndex.Indent = 19; this.TViewHelpIndex.Location = new global::System.Drawing.Point(0, 0); this.TViewHelpIndex.Name = "TViewHelpIndex"; this.TViewHelpIndex.PathSeparator = "."; this.TViewHelpIndex.SelectedImageIndex = 3; this.TViewHelpIndex.Size = new global::System.Drawing.Size(184, 573); this.TViewHelpIndex.TabIndex = 0; this.TViewHelpIndex.AfterSelect += new global::System.Windows.Forms.TreeViewEventHandler(this.TViewHelpIndex_AfterSelect); this.TreeIcons.ImageSize = new global::System.Drawing.Size(16, 16); this.TreeIcons.ImageStream = (global::System.Windows.Forms.ImageListStreamer)resourceManager.GetObject("TreeIcons.ImageStream"); this.TreeIcons.TransparentColor = global::System.Drawing.Color.Transparent; this.splitter1.Location = new global::System.Drawing.Point(184, 0); this.splitter1.Name = "splitter1"; this.splitter1.Size = new global::System.Drawing.Size(4, 573); this.splitter1.TabIndex = 1; this.splitter1.TabStop = false; this.HtmlHelpContent.Dock = global::System.Windows.Forms.DockStyle.Fill; this.HtmlHelpContent.Enabled = true; this.HtmlHelpContent.Location = new global::System.Drawing.Point(188, 0); this.HtmlHelpContent.OcxState = (global::System.Windows.Forms.AxHost.State)resourceManager.GetObject("HtmlHelpContent.OcxState"); this.HtmlHelpContent.Size = new global::System.Drawing.Size(604, 573); this.HtmlHelpContent.TabIndex = 2; this.AutoScaleBaseSize = new global::System.Drawing.Size(6, 14); base.ClientSize = new global::System.Drawing.Size(792, 573); base.Controls.Add(this.HtmlHelpContent); base.Controls.Add(this.splitter1); base.Controls.Add(this.TViewHelpIndex); base.Name = "HelpViewer"; this.Text = "Help"; ((global::System.ComponentModel.ISupportInitialize) this.HtmlHelpContent).EndInit(); base.ResumeLayout(false); }
/// <summary> /// Returns a list of toolbox items for use with this DSL. /// </summary> public virtual global::System.Collections.Generic.IList <DslDesign::ModelingToolboxItem> CreateToolboxItems() { global::System.Collections.Generic.List <DslDesign::ModelingToolboxItem> toolboxItems = new global::System.Collections.Generic.List <DslDesign::ModelingToolboxItem>(); // Create store and load domain models. using (DslModeling::Store store = new DslModeling::Store(this.ServiceProvider)) { store.LoadDomainModels(typeof(DslDiagrams::CoreDesignSurfaceDomainModel), typeof(global::pelsoft.FWK_Dsl.FWK_DslDomainModel)); global::System.Resources.ResourceManager resourceManager = global::pelsoft.FWK_Dsl.FWK_DslDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; // Open transaction so we can create model elements corresponding to toolbox items. using (DslModeling::Transaction t = store.TransactionManager.BeginTransaction("CreateToolboxItems")) { // Add ModelClass shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ModelClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ModelClassToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ModelClassToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ModelClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ModelClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::pelsoft.FWK_Dsl.ModelClass.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add Attribute shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "AttributeToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AttributeToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AttributeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AttributeF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("AttributeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::pelsoft.FWK_Dsl.ModelAttribute.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add ClassOperation shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ClassOperationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassOperationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassOperationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClassOperationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassOperationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::pelsoft.FWK_Dsl.ClassOperation.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add ModelInterface shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ModelInterfaceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ModelInterfaceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ModelInterfaceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ModelInterfaceF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ModelInterfaceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::pelsoft.FWK_Dsl.ModelInterface.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add InterfaceOperation shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "InterfaceOperationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("InterfaceOperationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InterfaceOperationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "InterfaceOperationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("InterfaceOperationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::pelsoft.FWK_Dsl.InterfaceOperation.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add UnidirectionalAssociation connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "UnidirectionalAssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("UnidirectionalAssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("UnidirectionalAssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectUnidirectionalAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("UnidirectionalAssociationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(UnidirectionalAssociationFilterString) })); // Add BidirectionalAssociation connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "BidirectionalAssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BidirectionalAssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BidirectionalAssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectBidirectionalAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("BidirectionalAssociationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(BidirectionalAssociationFilterString) })); // Add Aggregation connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "AggregationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AggregationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AggregationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AggregationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("AggregationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(AggregationFilterString) })); // Add Composition connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "CompositionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 9, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CompositionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CompositionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CompositionF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CompositionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CompositionFilterString) })); // Add Generalization connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "GeneralizationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 10, // Position relative to other items in the same toolbox tab. resourceManager.GetString("GeneralizationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("GeneralizationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "GeneralizationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("GeneralizationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(GeneralizationFilterString) })); // Add MultipleAssociation shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "MultipleAssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 11, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MultipleAssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MultipleAssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MultipleAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("MultipleAssociationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::pelsoft.FWK_Dsl.MultipleAssociation.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add MultipleAssociationRole connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "MultipleAssociationRoleToolboxItem", // Unique identifier (non-localized) for the toolbox item. 12, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MultipleAssociationRoleToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MultipleAssociationRoleToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MultipleAssociationRoleF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("MultipleAssociationRoleToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(MultipleAssociationRoleFilterString) })); // Add AssociationClassRelationship connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "AssociationClassRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 13, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AssociationClassRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AssociationClassRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AssociationClassRelationshipF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("AssociationClassRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(AssociationClassRelationshipFilterString) })); // Add Comment shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "CommentToolboxItem", // Unique identifier (non-localized) for the toolbox item. 14, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::pelsoft.FWK_Dsl.Comment.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) })); // Add CommentsReferenceTypes connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "CommentsReferenceTypesToolboxItem", // Unique identifier (non-localized) for the toolbox item. 15, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentsReferenceTypesToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentsReferenceTypesToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentsReferenceTypesF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentsReferenceTypesToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CommentsReferenceTypesFilterString) })); t.Rollback(); } } return(toolboxItems); }