public LocalizedString(Type source, String resourceName, String key) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(resourceName, source.Assembly); var resourceMan = temp; Text = resourceMan.GetString(key, System.Threading.Thread.CurrentThread.CurrentUICulture); }
public static Bitmap LoadImageFromResource(string resourceName) { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("HCMIS.Security.UserManagement.Properties.Resources", typeof(Resources).Assembly); var bitmap = resourceManager.GetObject(resourceName.Trim(),null); if (bitmap == null) return null; var icon = new Bitmap((Bitmap)bitmap, new Size(24,24)); return icon; }
private static string GetResourceString([CallerMemberName] string resourceName = null) { #if WINDOWS_PHONE global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Csla.Properties.Resources", typeof(Resources).Assembly); var value = temp.GetString("ms-resource:///Csla/Resources/" + resourceName); if (string.IsNullOrWhiteSpace(value)) throw new NullReferenceException(resourceName); return value; #else var loader = new Windows.ApplicationModel.Resources.ResourceLoader("Csla/Resources"); return loader.GetString(resourceName); #endif }
static ResourceMessages() { try { foreach (string resName in typeof (ResourceMessages).Assembly.GetManifestResourceNames()) { if (resName.EndsWith("NClassify.resources", global::System.StringComparison.Ordinal)) { ResourceManager = new global::System.Resources.ResourceManager( resName.Substring(0, resName.Length - ".resources".Length), typeof (ResourceMessages).Assembly ); break; } } } catch { ResourceManager = null; } }
private static Image GetImageFromResource(string path) { if (String.IsNullOrEmpty(path)) return null; string[] parts = path.Split(';'); if (parts.Length != 3) return null; AssemblyName name = new AssemblyName(parts[0]); var assembly = Assembly.Load(name); if (assembly == null) return null; var manager = new global::System.Resources.ResourceManager(parts[1], assembly); manager.IgnoreCase = true; var bitmap = (Bitmap)manager.GetObject(parts[2]); return bitmap; }
public static Bitmap LoadImageFromResource(string resourceName,int width, int height) { try { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("HCMIS.Desktop.Properties.Resources", typeof(Resources).Assembly); if (resourceName == null) return null; var bitmap = resourceManager.GetObject(resourceName.Trim(), null); if (bitmap == null) return null; var icon = new Bitmap((Bitmap)bitmap, new Size(width, height)); return icon; } catch { return null; } }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Sawczyn.EFDesigner.EFModel.EFModelDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Sawczyn.EFDesigner.EFModel.ModelClassToolboxItem": // Add ModelClass shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.ModelClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ModelClassToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ModelClassToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ModelClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ModelClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.EFDesigner.EFModel.ModelClass.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute("ModelClass"), // HACK : MEXEDGE new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ModelClassFilterString) }); break; case "Sawczyn.EFDesigner.EFModel.UnidirectionalAssociationToolboxItem": // Add UnidirectionalAssociation connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.UnidirectionalAssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("UnidirectionalAssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("UnidirectionalAssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectUnidirectionalAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("UnidirectionalAssociationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(UnidirectionalAssociationFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("UnidirectionalAssociation"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.BidirectionalAssociationToolboxItem": // Add BidirectionalAssociation connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.BidirectionalAssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BidirectionalAssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BidirectionalAssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectBidirectionalAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("BidirectionalAssociationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(BidirectionalAssociationFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("BidirectionalAssociation"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.GeneralizationToolboxItem": // Add Generalization connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.GeneralizationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("GeneralizationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("GeneralizationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "GeneralizationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("GeneralizationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(GeneralizationFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("Generalization"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.CommentToolboxItem": // Add Comment shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.CommentToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.EFDesigner.EFModel.Comment.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute("Comment"), // HACK : MEXEDGE new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CommentFilterString) }); break; case "Sawczyn.EFDesigner.EFModel.CommentLinkToolboxItem": // Add CommentLink connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.CommentLinkToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentLinkToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentLinkToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentsReferenceDesignElementsF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentLinkToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CommentLinkFilterString), new global::System.ComponentModel.ToolboxItemFilterAttribute("CommentLink"), // HACK : MEXEDGE }); break; case "Sawczyn.EFDesigner.EFModel.EnumerationToolboxItem": // Add Enumeration shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.EFDesigner.EFModel.EnumerationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EnumerationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EnumerationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.EFDesigner.EFModel.EF Model DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EF Model DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ModelEnumF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("EnumerationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.EFDesigner.EFModel.ModelEnum.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute("Enumeration"), // HACK : MEXEDGE new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(EnumerationFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::CQRSAzure.CQRSdsl.Dsl.CQRSdslDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "CQRSAzure.CQRSdsl.Dsl.AggregateToolToolboxItem": // Add AggregateTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.AggregateToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AggregateToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AggregateToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Aggregate", // F1 help keyword for the toolbox item. resourceManager.GetString("AggregateToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.AggregateIdentifier.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.EventDefinitionToolToolboxItem": // Add EventDefinitionTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.EventDefinitionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EventDefinitionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EventDefinitionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "EventDefinitionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("EventDefinitionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.EventDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ProjectionToolToolboxItem": // Add ProjectionTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ProjectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProjectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProjectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ProjectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ProjectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.ProjectionDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.CommandToolToolboxItem": // Add CommandTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.CommandToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommandToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommandToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommandTool", // F1 help keyword for the toolbox item. resourceManager.GetString("CommandToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.CommandDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.QueryToolToolboxItem": // Add QueryTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.QueryToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("QueryToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("QueryToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "QueryTool", // F1 help keyword for the toolbox item. resourceManager.GetString("QueryToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.QueryDefinition.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ProjectionEventConnectionToolToolboxItem": // Add ProjectionEventConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ProjectionEventConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProjectionEventConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProjectionEventConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ProjectionEvent", // F1 help keyword for the toolbox item. resourceManager.GetString("ProjectionEventConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ProjectionEventConnectionToolFilterString) }); break; case "CQRSAzure.CQRSdsl.Dsl.AggregateParenthoodConnectionToolToolboxItem": // Add AggregateParenthoodConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.AggregateParenthoodConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AggregateParenthoodConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AggregateParenthoodConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AggregateParenthoodConnectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("AggregateParenthoodConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(AggregateParenthoodConnectionToolFilterString) }); break; case "CQRSAzure.CQRSdsl.Dsl.IdentityGroupToolToolboxItem": // Add IdentityGroupTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.IdentityGroupToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("IdentityGroupToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IdentityGroupToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "IdentityGroup", // F1 help keyword for the toolbox item. resourceManager.GetString("IdentityGroupToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.IdentityGroup.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ClassifierToolToolboxItem": // Add ClassifierTool shape tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ClassifierToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 9, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassifierToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassifierToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClassifierTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassifierToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::CQRSAzure.CQRSdsl.Dsl.Classifier.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "CQRSAzure.CQRSdsl.Dsl.ClassifierEventConnectionToolToolboxItem": // Add ClassifierEventConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ClassifierEventConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 10, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassifierEventConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassifierEventConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClassifierEventConnection", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassifierEventConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ClassifierEventConnectionToolFilterString) }); break; case "CQRSAzure.CQRSdsl.Dsl.ClassifierProjectionConnectionToolToolboxItem": // Add ClassifierProjectionConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "CQRSAzure.CQRSdsl.Dsl.ClassifierProjectionConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 11, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClassifierProjectionConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClassifierProjectionConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "CQRSAzure.CQRSdsl.Dsl.CQRS DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("CQRS DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClassifierProjectionConnectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassifierProjectionConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ClassifierProjectionConnectionToolFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Sets the culture. /// </summary> /// <param name="culture">The culture.</param> internal static void SetCulture(string culture) { MultilanguageResource.currentResources = Hashtable.Synchronized(new Hashtable()); MultilanguageResource.resourceManager = null; MultilanguageResource.cultureInfo = new CultureInfo(MultilanguageResource.cultureSuffix(culture)); Thread.CurrentThread.CurrentUICulture = MultilanguageResource.cultureInfo; }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1DomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "ce.GEB_NGN_PCR_Practica1.VentanaToolboxItem": // Add Ventana shape tool. result = new DslDesign::ModelingToolboxItem( "ce.GEB_NGN_PCR_Practica1.VentanaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("VentanaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("VentanaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("GEB_NGN_PCR_Practica1ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Ventana", // F1 help keyword for the toolbox item. resourceManager.GetString("VentanaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ce.GEB_NGN_PCR_Practica1.Ventana.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "ce.GEB_NGN_PCR_Practica1.MenuToolboxItem": // Add Menu shape tool. result = new DslDesign::ModelingToolboxItem( "ce.GEB_NGN_PCR_Practica1.MenuToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MenuToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MenuToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("GEB_NGN_PCR_Practica1ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Menu", // F1 help keyword for the toolbox item. resourceManager.GetString("MenuToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ce.GEB_NGN_PCR_Practica1.Menu.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "ce.GEB_NGN_PCR_Practica1.MenuItemToolboxItem": // Add MenuItem shape tool. result = new DslDesign::ModelingToolboxItem( "ce.GEB_NGN_PCR_Practica1.MenuItemToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MenuItemToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MenuItemToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "ce.GEB_NGN_PCR_Practica1.GEB_NGN_PCR_Practica1ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("GEB_NGN_PCR_Practica1ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MenuItem", // F1 help keyword for the toolbox item. resourceManager.GetString("MenuItemToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ce.GEB_NGN_PCR_Practica1.MenuItem.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
static Device() { messages = new global::System.Resources.ResourceManager("Bwg.Scsi.Messages", typeof(Device).Assembly); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "SchneiderElectricDMS.PowerFunctionsReportDSL.ExternalTypeToolboxItem": // Add ExternalType shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.ExternalTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ExternalTypeToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ExternalTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ExternalType", // F1 help keyword for the toolbox item. resourceManager.GetString("ExternalTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.ExternalType.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentToolboxItem": // Add Comment shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Comment", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.Comment.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentRelationshipToolboxItem": // Add CommentRelationship connector tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.CommentRelationshipToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentRelationshipToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentRelationshipToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CommentRelationship", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentRelationshipToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(CommentRelationshipFilterString) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.TabToolboxItem": // Add Tab shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.TabToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TabToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TabToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Tab", // F1 help keyword for the toolbox item. resourceManager.GetString("TabToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.Tab.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.DataGridToolboxItem": // Add DataGrid shape tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.DataGridToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("DataGridToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("DataGridToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "DataGrid", // F1 help keyword for the toolbox item. resourceManager.GetString("DataGridToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::SchneiderElectricDMS.PowerFunctionsReportDSL.DataGrid.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.TabTabReferenceToolboxItem": // Add TabTabReference connector tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.TabTabReferenceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TabTabReferenceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TabTabReferenceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TabTabReference", // F1 help keyword for the toolbox item. resourceManager.GetString("TabTabReferenceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(TabTabReferenceFilterString) }); break; case "SchneiderElectricDMS.PowerFunctionsReportDSL.TabDataGridReferenceToolboxItem": // Add TabDataGridReference connector tool. result = new DslDesign::ModelingToolboxItem( "SchneiderElectricDMS.PowerFunctionsReportDSL.TabDataGridReferenceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TabDataGridReferenceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TabDataGridReferenceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "SchneiderElectricDMS.PowerFunctionsReportDSL.PowerFunctionsReportDSLToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("PowerFunctionsReportDSLToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TabDataGridReference", // F1 help keyword for the toolbox item. resourceManager.GetString("TabDataGridReferenceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(TabDataGridReferenceFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Sawczyn.Sequencer.SequencerDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Sawczyn.Sequencer.MethodToolboxItem": // Add Method shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.MethodToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MethodToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MethodToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateTaskF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("MethodToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.Sequencer.Method.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 "Sawczyn.Sequencer.StartPointToolboxItem": // Add StartPoint shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.StartPointToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StartPointToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StartPointToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateStartStateF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("StartPointToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.Sequencer.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 "Sawczyn.Sequencer.EndPointToolboxItem": // Add EndPoint shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.EndPointToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EndPointToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EndPointToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateFinalStateF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("EndPointToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.Sequencer.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 "Sawczyn.Sequencer.BranchToolboxItem": // Add Branch shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.BranchToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BranchToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BranchToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateMergeBranchF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("BranchToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.Sequencer.Branch.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 "Sawczyn.Sequencer.SynchronizationToolboxItem": // Add Synchronization shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.SynchronizationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("SynchronizationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SynchronizationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Synchronization", // F1 help keyword for the toolbox item. resourceManager.GetString("SynchronizationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.Sequencer.Synchronization.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 "Sawczyn.Sequencer.FlowToolboxItem": // Add Flow connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.FlowToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FlowToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FlowToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectFlowF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("FlowToolboxTooltip", 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(FlowFilterString) }); break; case "Sawczyn.Sequencer.CommentToolboxItem": // Add Comment shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.CommentToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // 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.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateCommentF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.Sequencer.Comment.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Sawczyn.Sequencer.CommentSubjectsToolboxItem": // Add CommentSubjects connector tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.CommentSubjectsToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentSubjectsToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentSubjectsToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectCommentSubjectsF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentSubjectsToolboxTooltip", 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(CommentSubjectsFilterString) }); break; case "Sawczyn.Sequencer.ClassToolboxItem": // Add Class shape tool. result = new DslDesign::ModelingToolboxItem( "Sawczyn.Sequencer.ClassToolboxItem", // Unique identifier (non-localized) for the toolbox item. 9, // 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. "Sawczyn.Sequencer.SequencerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SequencerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Class", // F1 help keyword for the toolbox item. resourceManager.GetString("ClassToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Sawczyn.Sequencer.Class.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::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); }
public ResourceManagerBundle(global::System.Resources.ResourceManager resourceManager) { _resourceManager = resourceManager ?? throw new ArgumentNullException(nameof(resourceManager)); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::UPM_IPS.DNRDPVSQGProyectoMDD.DNRDPVSQGProyectoMDDDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaPToolboxToolboxItem": // Add VentanaPToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaPToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("VentanaPToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("VentanaPToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.VentanasToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("VentanasToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "VentanaPToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("VentanaPToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.VentanaPrincipal.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaSToolboxToolboxItem": // Add VentanaSToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.VentanaSToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("VentanaSToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("VentanaSToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.VentanasToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("VentanasToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "VentanaSToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("VentanaSToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.VentanaSecundaria.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.MenuToolboxToolboxItem": // Add MenuToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.MenuToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MenuToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MenuToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.ContenidoToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ContenidoToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MenuToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("MenuToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.Menu.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.ItemToolboxToolboxItem": // Add ItemToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.ItemToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ItemToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ItemToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.ContenidoToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ContenidoToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ItemToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("ItemToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.Item.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.BotonToolboxToolboxItem": // Add BotonToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.BotonToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BotonToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BotonToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.ContenidoToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ContenidoToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "BotonToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("BotonToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.Boton.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.FinToolboxToolboxItem": // Add FinToolbox shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.FinToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FinToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FinToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.Estados y relacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Estados y relacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "FinToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("FinToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DNRDPVSQGProyectoMDD.EstadoFin.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DNRDPVSQGProyectoMDD.RelacionToolboxToolboxItem": // Add RelacionToolbox connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DNRDPVSQGProyectoMDD.RelacionToolboxToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionToolboxToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionToolboxToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DNRDPVSQGProyectoMDD.Estados y relacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Estados y relacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionToolbox", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionToolboxToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionToolboxFilterString) }); break; default: break; } // end switch return(result); }
private List<MenuInfo> GetRibbonMenuTags() { List<MenuInfo> tags = new List<MenuInfo>(); foreach (var downloader in Downloader.GetAllDownloaders()) { var attributes = downloader.GetType().GetCustomAttributes(typeof(DownloaderAttribute),true); if (attributes != null) { foreach (DownloaderAttribute att in attributes) { var tag = tags.Find(p => p.TagName == att.MenuGroup); if(tag == null){ tag = new MenuInfo() ; tags.Add(tag); } tag.TagName = att.MenuGroup; global::System.Resources.ResourceManager resourceMan = new global::System.Resources.ResourceManager("ComicDownloader.Properties.Resources", typeof(Resources).Assembly); RibbonButton button = new RibbonButton() { Image = resourceMan.GetObject(att.Image32) as Image, Tag = downloader, //Text = downloader.Name }; button.Click += new EventHandler(delegate(object sender, EventArgs e) { var dl = ((RibbonButton)sender).Tag as Downloader; AddChildForm(dl.Name, dl); }); tag.Downloaders.Add(button); } } } return tags; }
/// <summary> /// Constructs a new nHydrateExplorerBase. /// </summary> protected nHydrateExplorerBase(global::System.IServiceProvider serviceProvider) : base(serviceProvider) { try { // Adds hidden path to hide elements from the explorer this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasStaticDatum.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasRelationFields.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.CompositeHasFields.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityReferencesModules.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasRelationModules.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasEntities.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasRelationModules.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.EntityHasComposites.DomainClassId }); this.AddHiddenPath(new global::System.Guid[] { global::nHydrate.Dsl.nHydrateModelHasIndexModules.DomainClassId }); } catch (global::System.InvalidOperationException) { // Each hidden path specified needs to have odd number of guid entries. The entries will alternative between // DomainRelationshipID and DomainClassID. The guids list should also start out with a DomainRelationshipID. // This exception will be swallowed... global::System.Diagnostics.Debug.Fail("Each hidden path specified needs to have odd number of guid entries.\r\nPlease update the HiddenNodes section under ExplorerBehavior in the DSL file\r\nso the Model Explorer can hide element properly."); } // Adds custom tree node settings... global::System.Resources.ResourceManager resourceManager = global::nHydrate.Dsl.nHydrateDomainModel.SingletonResourceManager; this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Entity.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Field.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.View.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ViewExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.StoredProcedureField.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StoredProcedureFieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.StoredProcedure.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StoredProcedureExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.StoredProcedureParameter.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StoredProcedureParameterExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.ViewField.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ViewFieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Composite.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CompositeExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.EntityMetadata.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityMetadataExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.FieldMetadata.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FieldMetadataExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.nHydrateModel.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("nHydrateModelExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Function.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.FunctionParameter.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionParameterExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.FunctionField.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionFieldExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.Index.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IndexExplorerImage")), false); this.AddExplorerNodeCustomSetting(global::nHydrate.Dsl.IndexColumn.DomainClassId, DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IndexColumnExplorerImage")), false); // Add a call back to provide ModelElementTreeNode TreeNode name in the Model Explorer this.GetModelElementDisplayNameEventHandler = new DslShell.GetModelElementDisplayNameEventHandler(GetModelElementDisplayName); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::BotFrameworkDsl.BotFrameworkDslDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "BotFrameworkDsl.ConversationFlowToolboxItem": // Add ConversationFlow connector tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.ConversationFlowToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConversationFlowToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConversationFlowToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectExampleRelationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ConversationFlowToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ConversationFlowFilterString) }); break; case "BotFrameworkDsl.StartToolboxItem": // Add Start shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.StartToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StartToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StartToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Start", // F1 help keyword for the toolbox item. resourceManager.GetString("StartToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.Start.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "BotFrameworkDsl.EndToolboxItem": // Add End shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.EndToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EndToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EndToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "End", // F1 help keyword for the toolbox item. resourceManager.GetString("EndToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.End.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "BotFrameworkDsl.SpeakToolboxItem": // Add Speak shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.SpeakToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("SpeakToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SpeakToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Speak", // F1 help keyword for the toolbox item. resourceManager.GetString("SpeakToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.Speak.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "BotFrameworkDsl.ListenToolboxItem": // Add Listen shape tool. result = new DslDesign::ModelingToolboxItem( "BotFrameworkDsl.ListenToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ListenToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ListenToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BotFrameworkDsl.BotFrameworkDslToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BotFrameworkDslToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Listen", // F1 help keyword for the toolbox item. resourceManager.GetString("ListenToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BotFrameworkDsl.Listen.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Microsoft.Practices.ServiceFactory.HostDesigner.HostDesignerDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Microsoft.Practices.ServiceFactory.HostDesigner.HostApplicationToolboxItem": // Add HostApplication shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.HostApplicationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("HostApplicationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("HostApplicationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "HostApplication", // F1 help keyword for the toolbox item. resourceManager.GetString("HostApplicationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.HostApplication.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(HostApplicationFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ServiceToolboxItem": // Add Service shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ServiceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ServiceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ServiceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Service", // F1 help keyword for the toolbox item. resourceManager.GetString("ServiceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.ServiceReference.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ServiceFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.EndpointToolboxItem": // Add Endpoint shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.EndpointToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EndpointToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EndpointToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Endpoint", // F1 help keyword for the toolbox item. resourceManager.GetString("EndpointToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.Endpoint.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(EndpointFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ClientApplicationToolboxItem": // Add ClientApplication shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ClientApplicationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClientApplicationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClientApplicationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClientApplication", // F1 help keyword for the toolbox item. resourceManager.GetString("ClientApplicationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.ClientApplication.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ClientApplicationFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyToolboxItem": // Add Proxy shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProxyToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProxyToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Proxy", // F1 help keyword for the toolbox item. resourceManager.GetString("ProxyToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.HostDesigner.Proxy.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ProxyFilterString) }); break; case "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyEndpointConnectionToolToolboxItem": // Add ProxyEndpointConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.HostDesigner.ProxyEndpointConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ProxyEndpointConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ProxyEndpointConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.HostDesigner.Host ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Host ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ProxyEndpointConnectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ProxyEndpointConnectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(ProxyEndpointConnectionToolFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns 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::BizTalkMessaging.BizTalkMessagingDomainModel)); global::System.Resources.ResourceManager resourceManager = global::BizTalkMessaging.BizTalkMessagingDomainModel.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 Broker shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "BrokerToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BrokerToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BrokerToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BizTalkMessagingToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BizTalkMessagingToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Broker", // F1 help keyword for the toolbox item. resourceManager.GetString("BrokerToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BizTalkMessaging.Broker.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 InPort shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "InPortToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("InPortToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InPortToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BizTalkMessagingToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BizTalkMessagingToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "InPort", // F1 help keyword for the toolbox item. resourceManager.GetString("InPortToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BizTalkMessaging.InPort.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 Outport shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "OutportToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("OutportToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("OutportToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BizTalkMessagingToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BizTalkMessagingToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Outport", // F1 help keyword for the toolbox item. resourceManager.GetString("OutportToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BizTalkMessaging.OutPort.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 Application shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ApplicationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ApplicationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ApplicationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BizTalkMessagingToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BizTalkMessagingToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateExampleClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ApplicationToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::BizTalkMessaging.Application.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 Application_To_Broker_Connector connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "Application_To_Broker_ConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("Application_To_Broker_ConnectorToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("Application_To_Broker_ConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BizTalkMessagingToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BizTalkMessagingToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ApplicationToBrokerConnector", // F1 help keyword for the toolbox item. resourceManager.GetString("Application_To_Broker_ConnectorToolboxTooltip", 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(Application_To_Broker_ConnectorFilterString) })); // Add Broker_To_Application_Connector connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "Broker_To_Application_ConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("Broker_To_Application_ConnectorToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("Broker_To_Application_ConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "BizTalkMessagingToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("BizTalkMessagingToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Broker_To_Application_Connector", // F1 help keyword for the toolbox item. resourceManager.GetString("Broker_To_Application_ConnectorToolboxTooltip", 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(Broker_To_Application_ConnectorFilterString) })); t.Rollback(); } } return(toolboxItems); }
//NOT USED FOR NOW private bool ValidateCredentialsLocaly(string username, string password, string appID) { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("LetsMT.MTProvider.PluginResources", typeof(PluginResources).Assembly); // create Web Service client string url = resourceManager.GetString("WebServiceUrl"); try { Microsoft.Win32.RegistryKey key; key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\\Tilde\\LetsMT"); if (key != null) { string RegUrl = key.GetValue("url", "none").ToString(); if (RegUrl.Length > 3) { if (RegUrl.Substring(0, 4) == "http") { url = RegUrl; } } } } catch (Exception) { } EndpointAddress endpoint = new EndpointAddress(url); BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport); binding.MaxBufferSize = int.MaxValue; binding.MaxReceivedMessageSize = int.MaxValue; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; LetsMTAPI.TranslationServiceContractClient TestService = new LetsMTAPI.TranslationServiceContractClient(binding, endpoint); TestService.ClientCredentials.UserName.UserName = username; TestService.ClientCredentials.UserName.Password = password; bool bCredentialsValid = true; try { TestService.GetUserInfo(appID); } catch (Exception ex) { if (ex.Message.Contains("The HTTP request is unauthorized")) { MessageBox.Show("Unrecognized username or password.", "Validation error", MessageBoxButtons.OK, MessageBoxIcon.Warning); bCredentialsValid = false; } else { MessageBox.Show(ex.ToString()); MessageBox.Show(ex.Message); MessageBox.Show("Cannot connect to server.", "Validation error", MessageBoxButtons.OK, MessageBoxIcon.Warning); bCredentialsValid = false; } } return(bCredentialsValid); }
public SMOScriptOptions() { resourceMan = new global::System.Resources.ResourceManager("SQLAzureMWUtils.Properties.Resources", Assembly.GetExecutingAssembly()); }
/// <summary> /// Get the resource string from invoked assembly by the key. /// </summary> /// <param name="errorCode">Errorcode for the exception</param> /// <param name="info">String parameters for error message.</param> /// <returns>Error message.</returns> private static string GetMessageFromResource(ExceptionErrorCode errorCode, params string[] info) { System.Resources.ResourceManager rm = new global::System.Resources.ResourceManager("Resources.ErrorMessages", global::System.Reflection. Assembly.Load( "App_GlobalResources")); //Try to get specific error message from Resource. string errorMessage = rm.GetString(errorCode.ToString()); if (string.IsNullOrEmpty(errorMessage)) { try { errorMessage = string.Format(rm.GetString(ExceptionErrorCode.ErrorMessageNotFound.ToString()), ((int)errorCode).ToString()); } catch { errorMessage = string.Format("Failed to get the ErrorMessage for ErrorCode: {0} and {1}", ((int)errorCode).ToString(), ((int)ExceptionErrorCode.ErrorMessageNotFound).ToString()); } } else { if (info != null && info.Length != 0) {//Whether we should use the format method to combine string. errorMessage = string.Format(errorMessage, info); } } return errorMessage; }
/// <summary> /// Gets the string. /// </summary> /// <param name="key">The key.</param> /// <returns></returns> private static string GetStringInternal(string key) { if (MultilanguageResource.currentResources.ContainsKey(key)) return (String)MultilanguageResource.currentResources[key]; string culture = MultilanguageResource.GetCurrentCulture(); if (cultureInfo == null) { MultilanguageResource.SetCulture(culture); } if (resourceManager == null) resourceManager = new ResourceManager(String.Format("NetSqlAzMan.SnapIn.Globalization.Resource_{0}", culture), Assembly.GetExecutingAssembly()); string result; try { result = MultilanguageResource.resourceManager.GetString(key); if (result != null) { if (result.IndexOf("\\r\\n") != -1) { result = result.Replace("\\r\\n", "\r\n"); } } else { result = String.Format("Globalization Error: Key '{0}' NOT FOUND in .resx file !!!", key); } } catch { result = String.Format("Globalization Error: Key '{0}' NOT FOUND in .resx file !!!", key); } lock (MultilanguageResource.currentResources.SyncRoot) { MultilanguageResource.currentResources.Add(key, result); } 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::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> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.MBRDCMDMIDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClaseToolToolboxItem": // Add ClaseTool shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClaseToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClaseToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClaseToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClasesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("ClasesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClaseTool", // F1 help keyword for the toolbox item. resourceManager.GetString("ClaseToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.ClasePrincipal.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAsociacionToolboxItem": // Add RelacionAsociacion connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAsociacionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAsociacionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAsociacionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAsociacion", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAsociacionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAsociacionFilterString) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionInclusivaToolboxItem": // Add RelacionAgregacionInclusiva connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionInclusivaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAgregacionInclusivaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAgregacionInclusivaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAgregacionInclusiva", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAgregacionInclusivaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAgregacionInclusivaFilterString) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionRelacionalToolboxItem": // Add RelacionAgregacionRelacional connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionAgregacionRelacionalToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAgregacionRelacionalToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAgregacionRelacionalToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAgregacionRelacional", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAgregacionRelacionalToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAgregacionRelacionalFilterString) }); break; case "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionHerenciaToolboxItem": // Add RelacionHerencia connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionHerenciaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionHerenciaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionHerenciaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.MBRDCMDMI_ProyectoIPS.MBRDCMDMI.RelacionesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RelacionesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionHerencia", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionHerenciaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionHerenciaFilterString) }); break; default: break; } // end switch return(result); }