/// <summary> /// Given a toolbox item "unique ID" and a data format identifier, returns the content of /// the data format. /// </summary> /// <param name="itemId">The unique ToolboxItem to retrieve data for</param> /// <param name="format">The desired format of the resulting data</param> public virtual object GetToolboxItemData(string itemId, DataFormats.Format format) { DslDesign::ModelingToolboxItem item = null; global::System.Resources.ResourceManager resourceManager = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; System.Windows.Forms.IDataObject tbxDataObj; //get the toolbox item item = GetToolboxItem(itemId); if (item != null) { ToolboxItemContainer container = new ToolboxItemContainer(item); tbxDataObj = container.ToolboxData; if (tbxDataObj.GetDataPresent(format.Name)) { return(tbxDataObj.GetData(format.Name)); } else { string invalidFormatString = resourceManager.GetString("UnsupportedToolboxFormat", resourceCulture); throw new InvalidOperationException(string.Format(resourceCulture, invalidFormatString, format.Name)); } } string errorFormatString = resourceManager.GetString("UnresolvedToolboxItem", resourceCulture); throw new InvalidOperationException(string.Format(resourceCulture, errorFormatString, itemId)); }
public void X() { var manager = new global::System.Resources.ResourceManager("ResourceStrings.Tests.Strings", typeof(ParserTests).Assembly); var en = manager.GetString("Access_Void", new System.Globalization.CultureInfo("en-US")); var th = manager.GetString("Access_Void", new System.Globalization.CultureInfo("th-TH")); Console.WriteLine($">> {en}"); Console.WriteLine($">> {th}"); }
private static string GetAuthorizationUrl(string redirectUrl) { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("LetsMT.MTProvider.PluginResources", typeof(PluginResources).Assembly); string letsMTLoginUrl = resourceManager.GetString("LetsMTLoginUrl"); //try to read Software\\Tilde\\LetsMT\\loginUrl registry string entry and it it exists replace the link try { Microsoft.Win32.RegistryKey key; key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\\Tilde\\LetsMT"); if (key != null) { string RegUrl = key.GetValue("loginUrl", "none").ToString(); if (RegUrl.Length > 3) { if (RegUrl.Substring(0, 4) == "http") { letsMTLoginUrl = RegUrl; } } } } catch (Exception) { } return(string.Format("{0}?returnUrl={1}", letsMTLoginUrl, HttpUtility.UrlEncode(redirectUrl))); }
public static string GetResource(string name) { // Create a resource manager to retrieve resources. //ResourceManager rm = new ResourceManager("Help", Assembly.GetExecutingAssembly()); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Domain.Resources.Resources.Messages", typeof(Messages).GetTypeInfo().Assembly); // Retrieve the value of the string resource named "welcome". // The resource manager will retrieve the value of the // localized resource using the caller's current culture setting. return(temp.GetString(name)); }
private static string GetResourceString(string key, params string[] tokens) { var culture = CultureInfo.CurrentCulture;; var str = ResourceManager.GetString(key, culture); for (int i = 0; i < tokens.Length; i += 2) { str = str.Replace(tokens[i], tokens[i + 1]); } return(str); }
internal LocalizedDescriptionAttribute(string description) : base(description) { string des = RM.GetString(description, CultureInfo.CurrentUICulture); if (des != null) { localizedDescription = des; } else { localizedDescription = description; } }
/// <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.EntityFrameworkCore.Modeling.EntityFrameworkCoreDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Microsoft.EntityFrameworkCore.Modeling.EntityTypeToolboxItem": // Add EntityType shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.EntityFrameworkCore.Modeling.EntityTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EntityTypeToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.EntityFrameworkCore.Modeling.Entity Framework CoreToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Entity Framework CoreToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "EntityType", // F1 help keyword for the toolbox item. resourceManager.GetString("EntityTypeToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.EntityFrameworkCore.Modeling.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; default: break; } // end switch return(result); }
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 }
internal LocalizedDisplayNameAttribute(string name) : base(name) { string ldn = RM.GetString(name, CultureInfo.CurrentUICulture); if (ldn != null) { localizedDisplayName = ldn; } else { localizedDisplayName = name; } }
internal LocalizedDefaultValueAttribute(string value) : base(value) { string val = RM.GetString(value, CultureInfo.CurrentUICulture); if (val != null) { localizedValue = val; } else { localizedValue = value; } }
/// <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::Company.SlideShowDesigner.SlideShowDesignerDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Company.SlideShowDesigner.PhotoToolboxItem": // Add Photo shape tool. result = new DslDesign::ModelingToolboxItem( "Company.SlideShowDesigner.PhotoToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("PhotoToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("PhotoToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Company.SlideShowDesigner.SlideShowDesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SlideShowDesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateExampleClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("PhotoToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Company.SlideShowDesigner.Photo.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 "Company.SlideShowDesigner.TransitionToolboxItem": // Add Transition connector tool. result = new DslDesign::ModelingToolboxItem( "Company.SlideShowDesigner.TransitionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TransitionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TransitionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Company.SlideShowDesigner.SlideShowDesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("SlideShowDesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectExampleRelationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("TransitionToolboxTooltip", 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(TransitionFilterString) }); break; default: break; } // end switch return(result); }
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 }
private static string GetString(string name, params string[] formatterNames) { var value = resourceMan.GetString(name); System.Diagnostics.Debug.Assert(value != null); if (formatterNames != null) { for (var i = 0; i < formatterNames.Length; i++) { value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); } } return(value); }
/// <summary> /// This is used to set up the shared resources /// </summary> static Session() { // Set up the JSON options JSONOptions = new JsonSerializerOptions { ReadCommentHandling = JsonCommentHandling.Skip, AllowTrailingCommas = true, }; // Read the configuration JSON // Get the text file var temp = new global::System.Resources.ResourceManager("Anki.Vector.WebVizSDK.Properties.Resources", typeof(Session).Assembly); var text = temp.GetString("webViz.json"); // Get the dictionary module2Port = JsonSerializer.Deserialize <Dictionary <string, int> >(text, JSONOptions); }
public object ProvideValue(IServiceProvider serviceProvider) { if (Text == null) { return(""); } global::System.Resources.ResourceManager resmgr = new global::System.Resources.ResourceManager(ResourceId, typeof(TranslateExtension).GetTypeInfo().Assembly); var translation = resmgr.GetString(Text, ci); if (translation == null) { #if DEBUG throw new ArgumentException( String.Format("Key '{0}' was not found in resources '{1}' for culture '{2}'.", Text, ResourceId, ci.Name), "Text"); #else translation = Text; // HACK: returns the key, which GETS DISPLAYED TO THE USER #endif } return(translation); }
private void укрToolStripMenuItem_Click(object sender, EventArgs e) { RealGases.Language.ChangeLanguage(); global::System.Resources.ResourceManager rm = new global::System.Resources.ResourceManager("RealGases.Properties." + RealGases.Properties.Settings.Default["lang"] as string, typeof(Form1).Assembly); теорияToolStripMenuItem.Text = rm.GetString("theory"); оПрограммеToolStripMenuItem.Text = rm.GetString("about"); инструкцияToolStripMenuItem.Text = rm.GetString("instruction"); укрToolStripMenuItem.Text = rm.GetString("lang"); Text = rm.GetString("lab_name"); for (int i = 0; i < GasChanger.Items.Count; i++) { switch (i) { case 2: GasChanger.Items[i] = "Хлор"; break; case 3: GasChanger.Items[i] = "Бром"; break; case 6: GasChanger.Items[i] = "Пропан"; break; default: GasChanger.Items[i] = rm.GetString("gas" + i); break; } } }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::JA.Risk.RiskDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "JA.Risk.ContainerToolboxItem": // Add Container shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.ContainerToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ContainerToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ContainerToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateContainerF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ContainerToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Risk.Container.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Risk.PortToolboxItem": // Add Port shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.PortToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("PortToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("PortToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Port", // F1 help keyword for the toolbox item. resourceManager.GetString("PortToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Risk.Port.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Risk.GeneralizationToolboxItem": // Add Generalization connector tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.GeneralizationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // 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. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectGeneralizationF1Keyword", // 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) }); break; case "JA.Risk.InteractionToolboxItem": // Add Interaction connector tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.InteractionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("InteractionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InteractionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Interaction", // F1 help keyword for the toolbox item. resourceManager.GetString("InteractionToolboxTooltip", 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(InteractionFilterString) }); break; case "JA.Risk.ContainsToolboxItem": // Add Contains connector tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.ContainsToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ContainsToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ContainsToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Contains", // F1 help keyword for the toolbox item. resourceManager.GetString("ContainsToolboxTooltip", 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(ContainsFilterString) }); break; case "JA.Risk.AssetToolboxItem": // Add Asset shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.AssetToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AssetToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AssetToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Asset", // F1 help keyword for the toolbox item. resourceManager.GetString("AssetToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Risk.Asset.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Risk.ContainsAssetToolboxItem": // Add ContainsAsset connector tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.ContainsAssetToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ContainsAssetToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ContainsAssetToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ContainsAsset", // F1 help keyword for the toolbox item. resourceManager.GetString("ContainsAssetToolboxTooltip", 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(ContainsAssetFilterString) }); break; case "JA.Risk.ThreatToolboxItem": // Add Threat shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.ThreatToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ThreatToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ThreatToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Threat", // F1 help keyword for the toolbox item. resourceManager.GetString("ThreatToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Risk.ThreatAgent.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Risk.LegitimateAccessToolboxItem": // Add LegitimateAccess connector tool. result = new DslDesign::ModelingToolboxItem( "JA.Risk.LegitimateAccessToolboxItem", // Unique identifier (non-localized) for the toolbox item. 9, // Position relative to other items in the same toolbox tab. resourceManager.GetString("LegitimateAccessToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("LegitimateAccessToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Risk.RiskToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("RiskToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "LegitimateAccess", // F1 help keyword for the toolbox item. resourceManager.GetString("LegitimateAccessToolboxTooltip", 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(LegitimateAccessFilterString) }); 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::ConfigurationSectionDesigner.ConfigurationSectionDesignerDomainModel)); global::System.Resources.ResourceManager resourceManager = global::ConfigurationSectionDesigner.ConfigurationSectionDesignerDomainModel.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 ConfigurationSection shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ConfigurationSectionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConfigurationSectionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationSectionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Configuration Section DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Configuration Section DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConfigurationSection", // F1 help keyword for the toolbox item. resourceManager.GetString("ConfigurationSectionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ConfigurationSectionDesigner.ConfigurationSection.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 ConfigurationElement shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ConfigurationElementToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConfigurationElementToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationElementToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Configuration Section DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Configuration Section DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConfigurationElement", // F1 help keyword for the toolbox item. resourceManager.GetString("ConfigurationElementToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ConfigurationSectionDesigner.ConfigurationElement.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 ConfigurationElementCollection shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ConfigurationElementCollectionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConfigurationElementCollectionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationElementCollectionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Configuration Section DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Configuration Section DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConfigurationElementCollection", // F1 help keyword for the toolbox item. resourceManager.GetString("ConfigurationElementCollectionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ConfigurationSectionDesigner.ConfigurationElementCollection.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 CollectionItemType connector tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "CollectionItemTypeToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CollectionItemTypeToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CollectionItemTypeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Configuration Section DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Configuration Section DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CollectionItemType", // F1 help keyword for the toolbox item. resourceManager.GetString("CollectionItemTypeToolboxTooltip", 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(CollectionItemTypeFilterString) })); // Add ConfigurationSectionGroup shape tool. toolboxItems.Add(new DslDesign::ModelingToolboxItem( "ConfigurationSectionGroupToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConfigurationSectionGroupToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConfigurationSectionGroupToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Configuration Section DesignerToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Configuration Section DesignerToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConfigurationSectionGroup", // F1 help keyword for the toolbox item. resourceManager.GetString("ConfigurationSectionGroupToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::ConfigurationSectionDesigner.ConfigurationSectionGroup.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) })); 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::IPS.UMLSPF.UMLSPFDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "IPS.UMLSPF.ConectarClasesToolboxItem": // Add ConectarClases connector tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ConectarClasesToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConectarClasesToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConectarClasesToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConectarClases", // F1 help keyword for the toolbox item. resourceManager.GetString("ConectarClasesToolboxTooltip", 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(ConectarClasesFilterString) }); break; case "IPS.UMLSPF.IconHerenciaToolboxItem": // Add IconHerencia shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.IconHerenciaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("IconHerenciaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("IconHerenciaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Herencia", // F1 help keyword for the toolbox item. resourceManager.GetString("IconHerenciaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.Herencia.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 "IPS.UMLSPF.ConectarPadreToolboxItem": // Add ConectarPadre connector tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ConectarPadreToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConectarPadreToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConectarPadreToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConectarPadre", // F1 help keyword for the toolbox item. resourceManager.GetString("ConectarPadreToolboxTooltip", 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(ConectarPadreFilterString) }); break; case "IPS.UMLSPF.ConectarHijoToolboxItem": // Add ConectarHijo connector tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ConectarHijoToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ConectarHijoToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ConectarHijoToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConectarHijo", // F1 help keyword for the toolbox item. resourceManager.GetString("ConectarHijoToolboxTooltip", 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(ConectarHijoFilterString) }); break; case "IPS.UMLSPF.AgregarMetodoToolboxItem": // Add AgregarMetodo shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.AgregarMetodoToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AgregarMetodoToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AgregarMetodoToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarMetodo", // F1 help keyword for the toolbox item. resourceManager.GetString("AgregarMetodoToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.Operaciones.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 "IPS.UMLSPF.ShapeClaseToolboxItem": // Add ShapeClase shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ShapeClaseToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ShapeClaseToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ShapeClaseToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarClase", // F1 help keyword for the toolbox item. resourceManager.GetString("ShapeClaseToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.Clase.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 "IPS.UMLSPF.ShapeParametroToolboxItem": // Add ShapeParametro shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ShapeParametroToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ShapeParametroToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ShapeParametroToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarParametro", // F1 help keyword for the toolbox item. resourceManager.GetString("ShapeParametroToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.Parametros.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 "IPS.UMLSPF.ShapeAtributoIDToolboxItem": // Add ShapeAtributoID shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ShapeAtributoIDToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ShapeAtributoIDToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ShapeAtributoIDToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarAtributoID", // F1 help keyword for the toolbox item. resourceManager.GetString("ShapeAtributoIDToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.AtributoIdentificador.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 "IPS.UMLSPF.ShapeAtributoToolboxItem": // Add ShapeAtributo shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ShapeAtributoToolboxItem", // Unique identifier (non-localized) for the toolbox item. 9, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ShapeAtributoToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ShapeAtributoToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarAtributo", // F1 help keyword for the toolbox item. resourceManager.GetString("ShapeAtributoToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.Atributo.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 "IPS.UMLSPF.ShapeClaseEToolboxItem": // Add ShapeClaseE shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ShapeClaseEToolboxItem", // Unique identifier (non-localized) for the toolbox item. 10, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ShapeClaseEToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ShapeClaseEToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarClase", // F1 help keyword for the toolbox item. resourceManager.GetString("ShapeClaseEToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.Clase.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 "IPS.UMLSPF.AgregarClaseEnriquecidaToolboxItem": // Add AgregarClaseEnriquecida shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.AgregarClaseEnriquecidaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 11, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AgregarClaseEnriquecidaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AgregarClaseEnriquecidaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarClaseEnriquecida", // F1 help keyword for the toolbox item. resourceManager.GetString("AgregarClaseEnriquecidaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.ClaseEnriquecida.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 "IPS.UMLSPF.AgregarEstiloClaseToolboxItem": // Add AgregarEstiloClase shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.AgregarEstiloClaseToolboxItem", // Unique identifier (non-localized) for the toolbox item. 12, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AgregarEstiloClaseToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AgregarEstiloClaseToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarEstiloClase", // F1 help keyword for the toolbox item. resourceManager.GetString("AgregarEstiloClaseToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.EstilosClase.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 "IPS.UMLSPF.AgregarEstiloMeetodosToolboxItem": // Add AgregarEstiloMeetodos shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.AgregarEstiloMeetodosToolboxItem", // Unique identifier (non-localized) for the toolbox item. 13, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AgregarEstiloMeetodosToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AgregarEstiloMeetodosToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarEstiloMeetodos", // F1 help keyword for the toolbox item. resourceManager.GetString("AgregarEstiloMeetodosToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.EstiloMetodos.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 "IPS.UMLSPF.ShapeParametrozToolboxItem": // Add ShapeParametroz shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.ShapeParametrozToolboxItem", // Unique identifier (non-localized) for the toolbox item. 14, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ShapeParametrozToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ShapeParametrozToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ShapeParametroz", // F1 help keyword for the toolbox item. resourceManager.GetString("ShapeParametrozToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.Parametros.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 "IPS.UMLSPF.AgregarEstiloAtributoToolboxItem": // Add AgregarEstiloAtributo shape tool. result = new DslDesign::ModelingToolboxItem( "IPS.UMLSPF.AgregarEstiloAtributoToolboxItem", // Unique identifier (non-localized) for the toolbox item. 15, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AgregarEstiloAtributoToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AgregarEstiloAtributoToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "IPS.UMLSPF.UMLSPFToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("UMLSPFToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AgregarEstiloAtributo", // F1 help keyword for the toolbox item. resourceManager.GetString("AgregarEstiloAtributoToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::IPS.UMLSPF.EstiloAtributos.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> /// 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> /// 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.DataContracts.DataContractDslDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Microsoft.Practices.ServiceFactory.DataContracts.DataContractToolToolboxItem": // Add DataContractTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.DataContracts.DataContractToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("DataContractToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("DataContractToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.DataContracts.Data Contract ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Data Contract ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "DataContractTool", // F1 help keyword for the toolbox item. resourceManager.GetString("DataContractToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.DataContracts.DataContract.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(DataContractToolFilterString) }); break; case "Microsoft.Practices.ServiceFactory.DataContracts.DataContractEnumToolToolboxItem": // Add DataContractEnumTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.DataContracts.DataContractEnumToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("DataContractEnumToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("DataContractEnumToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.DataContracts.Data Contract ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Data Contract ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "DataContractEnumTool", // F1 help keyword for the toolbox item. resourceManager.GetString("DataContractEnumToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.DataContracts.DataContractEnum.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(DataContractEnumToolFilterString) }); break; case "Microsoft.Practices.ServiceFactory.DataContracts.PrimitiveDataTypeCollectionToolToolboxItem": // Add PrimitiveDataTypeCollectionTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.DataContracts.PrimitiveDataTypeCollectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("PrimitiveDataTypeCollectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("PrimitiveDataTypeCollectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.DataContracts.Data Contract ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Data Contract ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "PrimitiveDataTypeCollectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("PrimitiveDataTypeCollectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.DataContracts.PrimitiveDataTypeCollection.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(PrimitiveDataTypeCollectionToolFilterString) }); break; case "Microsoft.Practices.ServiceFactory.DataContracts.DataContractCollectionToolToolboxItem": // Add DataContractCollectionTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.DataContracts.DataContractCollectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("DataContractCollectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("DataContractCollectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.DataContracts.Data Contract ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Data Contract ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "DataContractCollectionTool", // F1 help keyword for the toolbox item. resourceManager.GetString("DataContractCollectionToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.DataContracts.DataContractCollection.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(DataContractCollectionToolFilterString) }); break; case "Microsoft.Practices.ServiceFactory.DataContracts.FaultContractToolToolboxItem": // Add FaultContractTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.DataContracts.FaultContractToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FaultContractToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FaultContractToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.DataContracts.Data Contract ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Data Contract ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "FaultContractTool", // F1 help keyword for the toolbox item. resourceManager.GetString("FaultContractToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Practices.ServiceFactory.DataContracts.FaultContract.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(FaultContractToolFilterString) }); break; case "Microsoft.Practices.ServiceFactory.DataContracts.AggregationConnectionToolToolboxItem": // Add AggregationConnectionTool connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Practices.ServiceFactory.DataContracts.AggregationConnectionToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AggregationConnectionToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AggregationConnectionToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Practices.ServiceFactory.DataContracts.Data Contract ToolsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Data Contract ToolsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Aggregation", // F1 help keyword for the toolbox item. resourceManager.GetString("AggregationConnectionToolToolboxTooltip", 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(AggregationConnectionToolFilterString) }); break; default: break; } // end switch return(result); }
private static string GetResourceString(global::System.Resources.ResourceManager manager, string key) { return(manager == null ? null : manager.GetString(key, Thread.CurrentThread.CurrentCulture)); }
private static string GetRedirectUrl() { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("LetsMT.MTProvider.PluginResources", typeof(PluginResources).Assembly); return(string.Format("{0}/Temporary_Listen_Addresses/", resourceManager.GetString("HttpTemporaryListenAddresses"))); }
private void SetLetsMTApplicationSettings() { global::System.Resources.ResourceManager resourceManager = new global::System.Resources.ResourceManager("LetsMT.MTProvider.PluginResources", typeof(PluginResources).Assembly); this["WebServiceUrl"] = resourceManager.GetString("WebServiceUrl"); }
/// <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; 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.Example.Circuits.CircuitsDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Microsoft.Example.Circuits.DslPackage.ResistorToolboxItem": // Add Resistor shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Example.Circuits.DslPackage.ResistorToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ResistorToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ResistorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Example.Circuits.DslPackage.Circuit DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Circuit DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateComponentF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("ResistorToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Example.Circuits.Resistor.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.Example.Circuits.DslPackage.WireToolboxItem": // Add Wire connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Example.Circuits.DslPackage.WireToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("WireToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("WireToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Example.Circuits.DslPackage.Circuit DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Circuit DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectAssociationF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("WireToolboxTooltip", 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(WireFilterString) }); break; case "Microsoft.Example.Circuits.DslPackage.CommentToolboxItem": // Add Comment shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Example.Circuits.DslPackage.CommentToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // 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. "Microsoft.Example.Circuits.DslPackage.Circuit DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Circuit DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectCommentF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Example.Circuits.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 "Microsoft.Example.Circuits.DslPackage.CommentConnectorToolboxItem": // Add CommentConnector connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Example.Circuits.DslPackage.CommentConnectorToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CommentConnectorToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CommentConnectorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Example.Circuits.DslPackage.Circuit DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Circuit DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ConnectCommentsReferenceTypesF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("CommentConnectorToolboxTooltip", 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(CommentConnectorFilterString) }); break; case "Microsoft.Example.Circuits.DslPackage.JunctionToolboxItem": // Add Junction shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Example.Circuits.DslPackage.JunctionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("JunctionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("JunctionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Example.Circuits.DslPackage.Circuit DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Circuit DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Junction", // F1 help keyword for the toolbox item. resourceManager.GetString("JunctionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Example.Circuits.Junction.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.Example.Circuits.DslPackage.TransistorToolToolboxItem": // Add TransistorTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Example.Circuits.DslPackage.TransistorToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TransistorToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TransistorToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Example.Circuits.DslPackage.Circuit DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Circuit DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TransistorTool", // F1 help keyword for the toolbox item. resourceManager.GetString("TransistorToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Example.Circuits.Transistor.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.Example.Circuits.DslPackage.CapacitorToolToolboxItem": // Add CapacitorTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Example.Circuits.DslPackage.CapacitorToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("CapacitorToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("CapacitorToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Example.Circuits.DslPackage.Circuit DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Circuit DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CapacitorTool", // F1 help keyword for the toolbox item. resourceManager.GetString("CapacitorToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Example.Circuits.Capacitor.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::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(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) }); 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) }); 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) }); 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(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) }); 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(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::UPM_IPS.RAARMAPMCWeberMDD.RAARMAPMCWeberMDDDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "UPM_IPS.RAARMAPMCWeberMDD.iconoEntidadToolboxItem": // Add iconoEntidad shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.iconoEntidadToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("iconoEntidadToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("iconoEntidadToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "iconoEntidad", // F1 help keyword for the toolbox item. resourceManager.GetString("iconoEntidadToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.RAARMAPMCWeberMDD.Entidad.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.RAARMAPMCWeberMDD.iconoAtribEntToolboxItem": // Add iconoAtribEnt shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.iconoAtribEntToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("iconoAtribEntToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("iconoAtribEntToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "iconoAtribEnt", // F1 help keyword for the toolbox item. resourceManager.GetString("iconoAtribEntToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.RAARMAPMCWeberMDD.AtributoEnt.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.RAARMAPMCWeberMDD.iconoClavePrimToolboxItem": // Add iconoClavePrim shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.iconoClavePrimToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("iconoClavePrimToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("iconoClavePrimToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "iconoClavePrim", // F1 help keyword for the toolbox item. resourceManager.GetString("iconoClavePrimToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.RAARMAPMCWeberMDD.ClavePrimaria.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.RAARMAPMCWeberMDD.iconoRelacionToolboxItem": // Add iconoRelacion shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.iconoRelacionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("iconoRelacionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("iconoRelacionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "iconoRelacion", // F1 help keyword for the toolbox item. resourceManager.GetString("iconoRelacionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.RAARMAPMCWeberMDD.Relacion.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.RAARMAPMCWeberMDD.iconoAtribRelToolboxItem": // Add iconoAtribRel shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.iconoAtribRelToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("iconoAtribRelToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("iconoAtribRelToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "iconoAtribRel", // F1 help keyword for the toolbox item. resourceManager.GetString("iconoAtribRelToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.RAARMAPMCWeberMDD.AtributoRel.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.RAARMAPMCWeberMDD.RelAtribToolboxItem": // Add RelAtrib connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.RelAtribToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelAtribToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelAtribToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelAtrib", // F1 help keyword for the toolbox item. resourceManager.GetString("RelAtribToolboxTooltip", 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(RelAtribFilterString) }); break; case "UPM_IPS.RAARMAPMCWeberMDD.RelIzqToolboxItem": // Add RelIzq connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.RelIzqToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelIzqToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelIzqToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelIzq", // F1 help keyword for the toolbox item. resourceManager.GetString("RelIzqToolboxTooltip", 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(RelIzqFilterString) }); break; case "UPM_IPS.RAARMAPMCWeberMDD.RelDerToolboxItem": // Add RelDer connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.RAARMAPMCWeberMDD.RelDerToolboxItem", // Unique identifier (non-localized) for the toolbox item. 8, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelDerToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelDerToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.RAARMAPMCWeberMDD.Modelo Entidad-RelacionToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Modelo Entidad-RelacionToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelDer", // F1 help keyword for the toolbox item. resourceManager.GetString("RelDerToolboxTooltip", 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(RelDerFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::JA.Attack.AttackDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "JA.Attack.FlowToolToolboxItem": // Add FlowTool connector tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.FlowToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FlowToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FlowToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "FlowTool", // F1 help keyword for the toolbox item. resourceManager.GetString("FlowToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(FlowToolFilterString) }); break; case "JA.Attack.TaskToolToolboxItem": // Add TaskTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.TaskToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("TaskToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("TaskToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "TaskTool", // F1 help keyword for the toolbox item. resourceManager.GetString("TaskToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.Task.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.StateToolToolboxItem": // Add StateTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.StateToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StateToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StateToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "StateTool", // F1 help keyword for the toolbox item. resourceManager.GetString("StateToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.State.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.SyncToolToolboxItem": // Add SyncTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.SyncToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("SyncToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SyncToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "SyncTool", // F1 help keyword for the toolbox item. resourceManager.GetString("SyncToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.Synchronisation.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.StartToolToolboxItem": // Add StartTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.StartToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StartToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StartToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "StartTool", // F1 help keyword for the toolbox item. resourceManager.GetString("StartToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.StartPoint.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.EndToolToolboxItem": // Add EndTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.EndToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EndToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EndToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "EndTool", // F1 help keyword for the toolbox item. resourceManager.GetString("EndToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.EndPoint.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "JA.Attack.MergeToolToolboxItem": // Add MergeTool shape tool. result = new DslDesign::ModelingToolboxItem( "JA.Attack.MergeToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("MergeToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("MergeToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "JA.Attack.AttackToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AttackToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "MergeTool", // F1 help keyword for the toolbox item. resourceManager.GetString("MergeToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::JA.Attack.MergeBranch.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.DRQPJPFMAMPracticaDSLToolsDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadToolboxItem": // Add Entidad shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EntidadToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntidadToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EntidadesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateExampleClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("EntidadToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.Entidad.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionToolboxItem": // Add Relacion shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.EntidadesToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EntidadesToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Relacion", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relacion.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionAtributoToolboxItem": // Add RelacionAtributo connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionAtributoToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionAtributoToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionAtributoToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relaciones (Conectores)ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Relaciones (Conectores)ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionAtributo", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionAtributoToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionAtributoFilterString) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadIzquierdaToolboxItem": // Add RelacionEntidadIzquierda connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadIzquierdaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionEntidadIzquierdaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionEntidadIzquierdaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relaciones (Conectores)ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Relaciones (Conectores)ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionEntidadIzquierda", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionEntidadIzquierdaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionEntidadIzquierdaFilterString) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadDerechaToolboxItem": // Add RelacionEntidadDerecha connector tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.RelacionEntidadDerechaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("RelacionEntidadDerechaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("RelacionEntidadDerechaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.Relaciones (Conectores)ToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Relaciones (Conectores)ToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "RelacionEntidadDerecha", // F1 help keyword for the toolbox item. resourceManager.GetString("RelacionEntidadDerechaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(RelacionEntidadDerechaFilterString) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.ClavePrimariaToolboxItem": // Add ClavePrimaria shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.ClavePrimariaToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ClavePrimariaToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ClavePrimariaToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributosToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AtributosToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "ClavePrimaria", // F1 help keyword for the toolbox item. resourceManager.GetString("ClavePrimariaToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.ClavePrimaria.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoEntidadToolboxItem": // Add AtributoEntidad shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoEntidadToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AtributoEntidadToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AtributoEntidadToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributosToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AtributosToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AtributoEntidad", // F1 help keyword for the toolbox item. resourceManager.GetString("AtributoEntidadToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoEntidad.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoRelacionToolboxItem": // Add AtributoRelacion shape tool. result = new DslDesign::ModelingToolboxItem( "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoRelacionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AtributoRelacionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AtributoRelacionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributosToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("AtributosToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "AtributoRelacion", // F1 help keyword for the toolbox item. resourceManager.GetString("AtributoRelacionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::UPM_IPS.DRQPJPFMAMPracticaDSLTools.AtributoRelacion.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::nHydrate.Dsl.nHydrateDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "nHydrate.DslPackage.EntityToolboxItem": // Add Entity shape tool. result = new DslDesign::ModelingToolboxItem( "nHydrate.DslPackage.EntityToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EntityToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "nHydrate.DslPackage.nHydrateToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("nHydrateToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Entity", // F1 help keyword for the toolbox item. resourceManager.GetString("EntityToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::nHydrate.Dsl.Entity.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 "nHydrate.DslPackage.AssociationToolboxItem": // Add Association connector tool. result = new DslDesign::ModelingToolboxItem( "nHydrate.DslPackage.AssociationToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AssociationToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AssociationToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "nHydrate.DslPackage.nHydrateToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("nHydrateToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "", // F1 help keyword for the toolbox item. resourceManager.GetString("AssociationToolboxTooltip", 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(AssociationFilterString) }); break; case "nHydrate.DslPackage.InheritanceToolboxItem": // Add Inheritance connector tool. result = new DslDesign::ModelingToolboxItem( "nHydrate.DslPackage.InheritanceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("InheritanceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InheritanceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "nHydrate.DslPackage.nHydrateToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("nHydrateToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "", // F1 help keyword for the toolbox item. resourceManager.GetString("InheritanceToolboxTooltip", 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(InheritanceFilterString) }); break; case "nHydrate.DslPackage.ViewToolboxItem": // Add View shape tool. result = new DslDesign::ModelingToolboxItem( "nHydrate.DslPackage.ViewToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ViewToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ViewToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "nHydrate.DslPackage.nHydrateToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("nHydrateToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "View", // F1 help keyword for the toolbox item. resourceManager.GetString("ViewToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::nHydrate.Dsl.View.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 "nHydrate.DslPackage.FunctionToolboxItem": // Add Function shape tool. result = new DslDesign::ModelingToolboxItem( "nHydrate.DslPackage.FunctionToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FunctionToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "nHydrate.DslPackage.nHydrateToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("nHydrateToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Function", // F1 help keyword for the toolbox item. resourceManager.GetString("FunctionToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::nHydrate.Dsl.Function.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 "nHydrate.DslPackage.StoredProcedureToolboxItem": // Add StoredProcedure shape tool. result = new DslDesign::ModelingToolboxItem( "nHydrate.DslPackage.StoredProcedureToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("StoredProcedureToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("StoredProcedureToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "nHydrate.DslPackage.nHydrateToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("nHydrateToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "StoredProcedure", // F1 help keyword for the toolbox item. resourceManager.GetString("StoredProcedureToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::nHydrate.Dsl.StoredProcedure.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 "nHydrate.DslPackage.ViewLinkToolboxItem": // Add ViewLink connector tool. result = new DslDesign::ModelingToolboxItem( "nHydrate.DslPackage.ViewLinkToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ViewLinkToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ViewLinkToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "nHydrate.DslPackage.nHydrateToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("nHydrateToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "", // F1 help keyword for the toolbox item. resourceManager.GetString("ViewLinkToolboxTooltip", 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(ViewLinkFilterString) }); 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::Ufba.vShome.vShomeDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Ufba.vShome.DeviceToolboxItem": // Add Device shape tool. result = new DslDesign::ModelingToolboxItem( "Ufba.vShome.DeviceToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("DeviceToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("DeviceToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.vShome.Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Device", // F1 help keyword for the toolbox item. resourceManager.GetString("DeviceToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ufba.vShome.Device.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 "Ufba.vShome.FeatureToolboxItem": // Add Feature shape tool. result = new DslDesign::ModelingToolboxItem( "Ufba.vShome.FeatureToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FeatureToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FeatureToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.vShome.Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Feature", // F1 help keyword for the toolbox item. resourceManager.GetString("FeatureToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ufba.vShome.Feature.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 "Ufba.vShome.FatherToolboxItem": // Add Father connector tool. result = new DslDesign::ModelingToolboxItem( "Ufba.vShome.FatherToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FatherToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FatherToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.vShome.Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Father", // F1 help keyword for the toolbox item. resourceManager.GetString("FatherToolboxTooltip", 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(FatherFilterString) }); break; case "Ufba.vShome.ActuatorToolboxItem": // Add Actuator connector tool. result = new DslDesign::ModelingToolboxItem( "Ufba.vShome.ActuatorToolboxItem", // Unique identifier (non-localized) for the toolbox item. 4, // Position relative to other items in the same toolbox tab. resourceManager.GetString("ActuatorToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("ActuatorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.vShome.Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Actuator", // F1 help keyword for the toolbox item. resourceManager.GetString("ActuatorToolboxTooltip", 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(ActuatorFilterString) }); break; case "Ufba.vShome.SensorToolboxItem": // Add Sensor connector tool. result = new DslDesign::ModelingToolboxItem( "Ufba.vShome.SensorToolboxItem", // Unique identifier (non-localized) for the toolbox item. 5, // Position relative to other items in the same toolbox tab. resourceManager.GetString("SensorToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("SensorToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.vShome.Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Sensor", // F1 help keyword for the toolbox item. resourceManager.GetString("SensorToolboxTooltip", 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(SensorFilterString) }); break; case "Ufba.vShome.AlternativeToolboxItem": // Add Alternative connector tool. result = new DslDesign::ModelingToolboxItem( "Ufba.vShome.AlternativeToolboxItem", // Unique identifier (non-localized) for the toolbox item. 6, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AlternativeToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AlternativeToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.vShome.Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Alternative", // F1 help keyword for the toolbox item. resourceManager.GetString("AlternativeToolboxTooltip", 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(AlternativeFilterString) }); break; case "Ufba.vShome.BrotherToolboxItem": // Add Brother connector tool. result = new DslDesign::ModelingToolboxItem( "Ufba.vShome.BrotherToolboxItem", // Unique identifier (non-localized) for the toolbox item. 7, // Position relative to other items in the same toolbox tab. resourceManager.GetString("BrotherToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("BrotherToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.vShome.Class DiagramsToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Class DiagramsToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "Brother", // F1 help keyword for the toolbox item. resourceManager.GetString("BrotherToolboxTooltip", 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(BrotherFilterString) }); break; default: break; } // end switch return(result); }