Exemple #1
0
 // Constructors were not generated for this relationship because it had HasCustomConstructor
 // set to true. Please provide the constructors below in a partial class.
 public EntityShape(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
 {
 }
Exemple #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="store">Store containing the domain model.</param>
 public BarkerERShapeDomainModel(DslModeling::Store store)
     : base(store, DomainModelId)
 {
 }
Exemple #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public DCMLRACPGProyectoIPSDiagram(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
 {
 }
 ///<Summary>
 /// Defines a partial method that will be called from the constructor to
 /// allow any necessary serialization setup to be done.
 ///</Summary>
 ///<remarks>
 /// For a DSL created with the DSL Designer wizard, an implementation of this
 /// method will be generated in the GeneratedCode\SerializationHelper.cs class.
 ///</remarks>
 partial void InitializeSerialization(DslModeling::Store store);
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new link is to be created.</param>
 /// <param name="roleAssignments">List of relationship role assignments.</param>
 /// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
 public DomainModelHasTest(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
     : base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, Tum.TestLanguage.TestLanguageDomainModelIdProvider.Instance.AssignId(propertyAssignments))
 {
 }
Exemple #6
0
        /// <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);
        }
Exemple #7
0
        /// <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);
        }
Exemple #8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public ForeignKeyConnector(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartition : null, propertyAssignments)
 {
 }
Exemple #9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public ModelNoteLink(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartition : null, propertyAssignments)
 {
 }
Exemple #10
0
        /// <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);
        }
Exemple #11
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public ExternalConstraintLink(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartition : null, propertyAssignments)
 {
 }
Exemple #12
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public DataLayerDiagram(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartition : null, propertyAssignments)
 {
 }
Exemple #13
0
		/// <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;
		}
        /// <summary>
        /// Creates an ElementGroupPrototype for the element tool corresponding to the given domain class id.
        /// Default behavior is to create a prototype containing an instance of the domain class.
        /// Derived classes may override this to add additional information to the prototype.
        /// </summary>
        protected virtual DslModeling::ElementGroupPrototype CreateElementToolPrototype(DslModeling::Store store, global::System.Guid domainClassId)
        {
            DslModeling::ModelElement element      = store.ElementFactory.CreateElement(domainClassId);
            DslModeling::ElementGroup elementGroup = new DslModeling::ElementGroup(store.DefaultPartition);

            elementGroup.AddGraph(element, true);
            return(elementGroup.CreatePrototype());
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="store">Store containing the domain model.</param>
 public ORMToORMAbstractionBridgeDomainModel(DslModeling::Store store)
     : base(store, DomainModelId)
 {
     // Call the partial method to allow any required serialization setup to be done.
     this.InitializeSerialization(store);
 }
Exemple #16
0
		/// <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::ORMSolutions.ORMArchitect.Framework.FrameworkDomainModel),
					typeof(global::ORMSolutions.ORMArchitect.Core.ObjectModel.ORMCoreDomainModel),
					typeof(global::Microsoft.VisualStudio.Modeling.Diagrams.CoreDesignSurfaceDomainModel),
					typeof(global::ORMSolutions.ORMArchitect.Core.ShapeModel.ORMShapeDomainModel));
				global::System.Resources.ResourceManager resourceManager = global::ORMSolutions.ORMArchitect.Core.ShapeModel.ORMShapeDomainModel.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 EntityType shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"EntityTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						1, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("EntityTypeToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"EntityType", // F1 help keyword for the toolbox item.
						resourceManager.GetString("EntityTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.ObjectType.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 ValueType shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ValueTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						2, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ValueTypeToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ValueTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ValueType", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ValueTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.ObjectType.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 ObjectifiedFactType shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ObjectifiedFactTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						3, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ObjectifiedFactTypeToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ObjectifiedFactTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ObjectifiedFactType", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ObjectifiedFactTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.ObjectType.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 UnaryFactType shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"UnaryFactTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						4, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("UnaryFactTypeToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("UnaryFactTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"UnaryFactType", // F1 help keyword for the toolbox item.
						resourceManager.GetString("UnaryFactTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.FactType.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 BinaryFactType shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"BinaryFactTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						5, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("BinaryFactTypeToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BinaryFactTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"BinaryFactType", // F1 help keyword for the toolbox item.
						resourceManager.GetString("BinaryFactTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.FactType.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 TernaryFactType shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"TernaryFactTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						6, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("TernaryFactTypeToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TernaryFactTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"TernaryFactType", // F1 help keyword for the toolbox item.
						resourceManager.GetString("TernaryFactTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.FactType.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 RoleConnector connector tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"RoleConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						7, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("RoleConnectorToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RoleConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.				
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"RoleConnector", // F1 help keyword for the toolbox item.
						resourceManager.GetString("RoleConnectorToolboxTooltip", 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(RoleConnectorFilterString)
						}));

					// Add SubtypeConnector connector tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"SubtypeConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						8, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("SubtypeConnectorToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SubtypeConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.				
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"SubtypeConnector", // F1 help keyword for the toolbox item.
						resourceManager.GetString("SubtypeConnectorToolboxTooltip", 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(SubtypeConnectorFilterString)
						}));

					// Add InternalUniquenessConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"InternalUniquenessConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						9, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("InternalUniquenessConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InternalUniquenessConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"InternalUniquenessConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("InternalUniquenessConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.UniquenessConstraint.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 ExternalUniquenessConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ExternalUniquenessConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						10, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ExternalUniquenessConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ExternalUniquenessConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ExternalUniquenessConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ExternalUniquenessConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.UniquenessConstraint.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 EqualityConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"EqualityConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						11, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("EqualityConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EqualityConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"EqualityConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("EqualityConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.EqualityConstraint.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 ExclusionConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ExclusionConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						12, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ExclusionConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ExclusionConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ExclusionConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ExclusionConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.ExclusionConstraint.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 InclusiveOrConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"InclusiveOrConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						13, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("InclusiveOrConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InclusiveOrConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"InclusiveOrConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("InclusiveOrConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.MandatoryConstraint.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 ExclusiveOrConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ExclusiveOrConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						14, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ExclusiveOrConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ExclusiveOrConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ExclusiveOrConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ExclusiveOrConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.ExclusiveOrConstraintCoupler.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 SubsetConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"SubsetConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						15, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("SubsetConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SubsetConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"SubsetConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("SubsetConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.SubsetConstraint.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 FrequencyConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"FrequencyConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						16, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("FrequencyConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FrequencyConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"FrequencyConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("FrequencyConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.FrequencyConstraint.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 RingConstraint shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"RingConstraintToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						17, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("RingConstraintToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RingConstraintToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"RingConstraint", // F1 help keyword for the toolbox item.
						resourceManager.GetString("RingConstraintToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.RingConstraint.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 ExternalConstraintConnector connector tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ExternalConstraintConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						18, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ExternalConstraintConnectorToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ExternalConstraintConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.				
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ExternalConstraintConnector", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ExternalConstraintConnectorToolboxTooltip", 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(ExternalConstraintConnectorFilterString)
						}));

					// Add ModelNote shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ModelNoteToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						19, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ModelNoteToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ModelNoteToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ModelNote", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ModelNoteToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::ORMSolutions.ORMArchitect.Core.ObjectModel.ModelNote.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 ModelNoteConnector connector tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ModelNoteConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						20, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ModelNoteConnectorToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ModelNoteConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.				
						"ORM DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("ORM DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"ModelNoteConnector", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ModelNoteConnectorToolboxTooltip", 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(ModelNoteConnectorFilterString)
						}));

					t.Rollback();
				}
			}

			return toolboxItems;
		}
Exemple #17
0
 // Constructors were not generated for this class because it had HasCustomConstructor
 // set to true. Please provide the constructors below in a partial class.
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public StoredProcedureParameter(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
 {
 }
Exemple #18
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public FormaAtributoRelacion(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
 {
 }
Exemple #19
0
        /// <summary>
        /// This method returns the moniker resolvers for each of the domain models in the store
        /// </summary>
        /// <param name="store">Store on which the moniker resolvers are set up.</param>
        internal protected virtual global::System.Collections.Generic.IDictionary <global::System.Guid, DslModeling::IMonikerResolver> GetMonikerResolvers(DslModeling::Store store)
        {
            #region Check Parameters
            global::System.Diagnostics.Debug.Assert(store != null);
            if (store == null)
            {
                throw new global::System.ArgumentNullException("store");
            }
            #endregion

            global::System.Collections.Generic.Dictionary <global::System.Guid, DslModeling::IMonikerResolver> result = new global::System.Collections.Generic.Dictionary <global::System.Guid, DslModeling::IMonikerResolver>();
            foreach (DslModeling::DomainModelInfo modelInfo in store.DomainDataDirectory.DomainModels)
            {
                if (modelInfo.MonikerResolver != null)
                {
                    result.Add(modelInfo.Id, modelInfo.MonikerResolver);
                }
            }

            return(result);
        }
Exemple #20
0
 /// <summary>
 /// Initialize the doc data
 /// </summary>
 public override void Initialize(DslModeling::Store sharedStore)
 {
     this.InitializeComposition();
     base.Initialize(sharedStore);
 }
Exemple #21
0
 partial void InitializeSerialization(DslModeling::Store store)
 {
     // Register the serializers and moniker resolver for this model
     LibrarySerializationHelper.Instance.InitializeSerialization(store);
 }
 /// <summary>
 /// Ensure that domain element serializers are installed properly on the given store,
 /// so that deserialization can be carried out correctly.
 /// </summary>
 /// <param name="store">Store.</param>
 public new virtual void InitializeSerialization(DslModeling::Store store)
 {
     base.Initialize(store);
 }
Exemple #23
0
 /// <summary>
 /// Return the directory of serializers to use
 /// </summary>
 protected virtual DslModeling::DomainXmlSerializerDirectory GetDirectory(DslModeling::Store store)
 {
     // Just return the default serialization directory from the store
     return(store.SerializerDirectory);
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="store">Store containing the domain model.</param>
 public MobileDSLDomainModel(DslModeling::Store store)
     : base(store, DomainModelId)
 {
     // Call the partial method to allow any required serialization setup to be done.
     this.InitializeSerialization(store);
 }
Exemple #25
0
        /// <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);
        }
Exemple #26
0
        /// <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>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new link is to be created.</param>
 /// <param name="roleAssignments">List of relationship role assignments.</param>
 public ExampleElementReferencesTargets(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
     : base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
 {
 }
 /// <summary>
 /// Returns the root elements to be displayed in the explorer.
 ///</summary>
 protected override global::System.Collections.IList FindRootElements(DslModeling::Store store)
 {
     return(store.ElementDirectory.FindElements(this.RootElementDomainClassId));
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new link is to be created.</param>
 /// <param name="roleAssignments">List of relationship role assignments.</param>
 /// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
 public ExampleModelHasElements(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
     : base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
 {
 }
        /// <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);
        }
Exemple #31
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="store">Store where new element is to be created.</param>
 /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
 public BarkerEntityShape(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
     : this(store != null ? store.DefaultPartition : null, propertyAssignments)
 {
 }
        /// <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 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::DmitriNesteruk.AsyncDsl.AsyncDslDomainModel));
				global::System.Resources.ResourceManager resourceManager = global::DmitriNesteruk.AsyncDsl.AsyncDslDomainModel.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 Process shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"ProcessToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						1, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("ProcessToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProcessToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"Process", // F1 help keyword for the toolbox item.
						resourceManager.GetString("ProcessToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::DmitriNesteruk.AsyncDsl.Process.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 Comment shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"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.
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", 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::DmitriNesteruk.AsyncDsl.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 Operation shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"OperationToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						3, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("OperationToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("OperationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"Operation", // F1 help keyword for the toolbox item.
						resourceManager.GetString("OperationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::DmitriNesteruk.AsyncDsl.Operation.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 FinishToStartConnector connector tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"FinishToStartConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						4, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("FinishToStartConnectorToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FinishToStartConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.				
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"FinishToStartConnector", // F1 help keyword for the toolbox item.
						resourceManager.GetString("FinishToStartConnectorToolboxTooltip", 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(FinishToStartConnectorFilterString)
						}));

					// Add Start shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"StartToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						5, // 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.
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", 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::DmitriNesteruk.AsyncDsl.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) 
						}));

					// Add Finish shape tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"FinishToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						6, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("FinishToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FinishToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"Finish", // F1 help keyword for the toolbox item.
						resourceManager.GetString("FinishToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item.
						CreateElementToolPrototype(store, global::DmitriNesteruk.AsyncDsl.Finish.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 CommentConnection connector tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"CommentConnectionToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						7, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("CommentConnectionToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentConnectionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.				
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"CommentConnection", // F1 help keyword for the toolbox item.
						resourceManager.GetString("CommentConnectionToolboxTooltip", 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(CommentConnectionFilterString)
						}));

					// Add StartToStartConnector connector tool.
					toolboxItems.Add(new DslDesign::ModelingToolboxItem(
						"StartToStartConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item.
						8, // Position relative to other items in the same toolbox tab.
						resourceManager.GetString("StartToStartConnectorToolboxItem", resourceCulture), // Localized display name for the item.
						(global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StartToStartConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item.				
						"AsyncDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab.
						resourceManager.GetString("AsyncDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab.
						"StartToStartConnector", // F1 help keyword for the toolbox item.
						resourceManager.GetString("StartToStartConnectorToolboxTooltip", 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(StartToStartConnectorFilterString)
						}));

					t.Rollback();
				}
			}

			return toolboxItems;
		}