public static void applyCultureChanges() { #line 39 "C:\\HaxeToolkit\\haxe\\std\\cs\\Lib.hx" global::System.Globalization.CultureInfo ci = new global::System.Globalization.CultureInfo(((string)(global::System.Threading.Thread.CurrentThread.CurrentCulture.Name)), ((bool)(true))); global::cs.Lib.decimalSeparator = ci.NumberFormat.NumberDecimalSeparator; #line 41 "C:\\HaxeToolkit\\haxe\\std\\cs\\Lib.hx" ci.NumberFormat.NumberDecimalSeparator = ((string)(".")); global::System.Threading.Thread.CurrentThread.CurrentCulture = ((global::System.Globalization.CultureInfo)(ci)); }
/// <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.Ev.EvDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Ufba.Ev.OptionElementToolboxItem": // Add OptionElement shape tool. result = new DslDesign::ModelingToolboxItem( "Ufba.Ev.OptionElementToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("OptionElementToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("OptionElementToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.Ev.EvToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EvToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "CreateExampleClassF1Keyword", // F1 help keyword for the toolbox item. resourceManager.GetString("OptionElementToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ufba.Ev.Option.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.Ev.FunctionElementToolboxItem": // Add FunctionElement shape tool. result = new DslDesign::ModelingToolboxItem( "Ufba.Ev.FunctionElementToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("FunctionElementToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("FunctionElementToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Ufba.Ev.EvToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("EvToolboxTab", resourceCulture), // Localized display name for the toolbox tab. "FunctionElement", // F1 help keyword for the toolbox item. resourceManager.GetString("FunctionElementToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Ufba.Ev.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; default: break; } // end switch return(result); }
public object ConvertBack(object value, Type targetType, object parameter, global::System.Globalization.CultureInfo culture) { var bitmapImage = value as BitmapImage; if (bitmapImage != null) { return(bitmapImage.ToByteArray()); } return(null); }
public void TestResources() { Resources re = new Resources(); global::System.Globalization.CultureInfo info = Resources.Culture; Resources.Culture = info; global::System.Resources.ResourceManager mgr = Resources.ResourceManager; // Resources.ResourceManager = mgr; }
public object Convert(object value, Type targetType, object parameter, global::System.Globalization.CultureInfo culture) { if (value == null) { return(FalseValue); } else { return((bool)value ? TrueValue : FalseValue); } }
public object Convert(object value, Type targetType, object parameter, global::System.Globalization.CultureInfo culture) { if (value == null) { return(Visibility.Collapsed); } if ((bool)value) { return(Visibility.Visible); } return(Visibility.Collapsed); }
private void Update_culture(global::System.Globalization.CultureInfo obj, int phase) { if (obj != null) { this.Update_item_Exposure_M_ToString3_2931822765(phase); this.Update_item_Temperature_M_ToString3_2931822765(phase); this.Update_item_Tint_M_ToString3_2931822765(phase); this.Update_item_Contrast_M_ToString3_2931822765(phase); this.Update_item_Saturation_M_ToString3_2931822765(phase); this.Update_item_Blur_M_ToString3_2931822765(phase); } }
public static string GetString(string format, params object[] args) { global::System.Globalization.CultureInfo culture = SR.Culture; string text = format; if (args != null && args.Length > 0) { text = String.Format(culture, format, args); } return(text); }
public object Convert(object value, Type targetType, object parameter, global::System.Globalization.CultureInfo culture) { if (parameter == null) { return(LoadImage("", (string)value)); } var filename = (string)value; switch ((string)parameter) { case "animation": return(LoadImage("Graphics/Animations/", filename)); case "autotile": return(LoadImage("Graphics/Autotiles/", filename)); case "battleback": return(LoadImage("Graphics/Battlebacks/", filename)); case "battler": return(LoadImage("Graphics/Battlers/", filename)); case "character": return(LoadImage("Graphics/Characters/", filename)); case "fog": return(LoadImage("Graphics/Fogs/", filename)); case "gameover": return(LoadImage("Graphics/Gameovers/", filename)); case "icon": return(LoadImage("Graphics/Icons/", filename)); case "panorama": return(LoadImage("Graphics/Panoramas/", filename)); case "picture": return(LoadImage("Graphics/Pictures/", filename)); case "tileset": return(LoadImage("Graphics/Tilesets/", filename)); case "title": return(LoadImage("Graphics/Titles/", filename)); case "windowskin": return(LoadImage("Graphics/Windowskins/", filename)); } return(LoadImage("", filename)); }
public object Convert(object[] values, Type targetType, object parameter, global::System.Globalization.CultureInfo culture) { bool expandState = (bool)values[0]; bool pinState = (bool)values[1]; bool showExpanded = false; if (values[2] != DependencyProperty.UnsetValue) { showExpanded = (bool)values[2]; } return(showExpanded); }
/// <summary> /// Converts from the specified value to the type of this converter. /// </summary> /// <param name="context">An object that provides a format context. /// </param> /// <param name="culture">The /// <see cref="T:System.Globalization.CultureInfo"/> to use as the /// current culture.</param> /// <param name="value">The value to convert to the type of this /// converter.</param> /// <returns>The converted value.</returns> /// <exception cref="T:System.NotSupportedException"> /// The conversion cannot be performed. /// </exception> public override object ConvertFrom(ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, object value) { string stringValue = value as string; if (value is T) { return(new Nullable <T>((T)value)); } else if (string.IsNullOrEmpty(stringValue) || String.Equals(stringValue, "Auto", StringComparison.OrdinalIgnoreCase)) { return(new Nullable <T>()); } return(new Nullable <T>((T)Convert.ChangeType(value, typeof(T), culture))); }
private bool TryGet_culture(out global::System.Globalization.CultureInfo val) { global::PhotoLab.DetailPage obj; if (TryGet_(out obj) && obj != null) { val = obj.culture; return(true); } else { val = default(global::System.Globalization.CultureInfo); return(false); } }
/// <summary> /// Constructs a new InheritanceToolConnectAction for the given Diagram. /// </summary> public InheritanceToolConnectAction(DslDiagrams::Diagram diagram) : base(diagram, true) { global::System.Resources.ResourceManager resourceManager = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; byte[] sourceCursorBytes = (byte[])resourceManager.GetObject("InheritanceToolSourceCursor", resourceCulture); using (global::System.IO.MemoryStream sourceCursorStream = new global::System.IO.MemoryStream(sourceCursorBytes)) { this.sourceCursor = new global::System.Windows.Forms.Cursor(sourceCursorStream); } byte[] targetCursorBytes = (byte[])resourceManager.GetObject("InheritanceToolTargetCursor", resourceCulture); using (global::System.IO.MemoryStream targetCursorStream = new global::System.IO.MemoryStream(targetCursorBytes)) { this.targetCursor = new global::System.Windows.Forms.Cursor(targetCursorStream); } }
/// <summary> /// Constructs a new FlowToolConnectAction for the given Diagram. /// </summary> public FlowToolConnectAction(DslDiagrams::Diagram diagram) : base(diagram, true) { global::System.Resources.ResourceManager resourceManager = global::JA.Attack.AttackDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; byte[] sourceCursorBytes = (byte[])resourceManager.GetObject("FlowToolSourceCursor", resourceCulture); using (global::System.IO.MemoryStream sourceCursorStream = new global::System.IO.MemoryStream(sourceCursorBytes)) { this.sourceCursor = new global::System.Windows.Forms.Cursor(sourceCursorStream); } byte[] targetCursorBytes = (byte[])resourceManager.GetObject("FlowToolTargetCursor", resourceCulture); using (global::System.IO.MemoryStream targetCursorStream = new global::System.IO.MemoryStream(targetCursorBytes)) { this.targetCursor = new global::System.Windows.Forms.Cursor(targetCursorStream); } }
public object Convert(object value, Type targetType, object parameter, global::System.Globalization.CultureInfo culture) { if (value is bool b) { return(b ? TrueValue : FalseValue); } if (value is string s) { return(string.IsNullOrWhiteSpace(s) ? FalseValue : TrueValue); } if (value is int i) { return(i == 0 ? FalseValue : TrueValue); } return(NullValue); }
private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) { if (value == null) { return(""); } if (value is System.Enum) { var name = System.Enum.GetName(value.GetType(), value); if (name != null) { var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); if (field != null) { var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) as System.Runtime.Serialization.EnumMemberAttribute; if (attribute != null) { return(attribute.Value != null ? attribute.Value : name); } } var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); return(converted == null ? string.Empty : converted); } } else if (value is bool) { return(System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant()); } else if (value is byte[]) { return(System.Convert.ToBase64String((byte[])value)); } else if (value.GetType().IsArray) { var array = System.Linq.Enumerable.OfType <object>((System.Array)value); return(string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo)))); } var result = System.Convert.ToString(value, cultureInfo); return(result == null ? "" : result); }
public object Convert(object value, Type targetType, object parameter, global::System.Globalization.CultureInfo culture) { if (value != null && value is byte[]) { var bytes = value as byte[]; var stream = new MemoryStream(bytes); var image = new BitmapImage(); image.BeginInit(); image.StreamSource = stream; image.EndInit(); return(image); } return(null); }
internal string ToString(global::System.Globalization.CultureInfo cultureInfo) { char listSeparator = TokenizerHelper.GetNumericListSeparator(cultureInfo); // Initial capacity [64] is an estimate based on a sum of: // 48 = 4x double (twelve digits is generous for the range of values likely) // 8 = 4x Unit Type string (approx two characters) // 4 = 4x separator characters global::System.Text.StringBuilder sb = new global::System.Text.StringBuilder(64); sb.Append(InternalToString(_TopLeft, cultureInfo)); sb.Append(listSeparator); sb.Append(InternalToString(_TopRight, cultureInfo)); sb.Append(listSeparator); sb.Append(InternalToString(_BottomRight, cultureInfo)); sb.Append(listSeparator); sb.Append(InternalToString(_BottomLeft, cultureInfo)); return(sb.ToString()); }
internal string ToString(global::System.Globalization.CultureInfo cultureInfo) { char listSeparator = TokenizerHelper.GetNumericListSeparator(cultureInfo); // Initial capacity [64] is an estimate based on a sum of: // 12 = 1x double (twelve digits is generous for the range of values likely) // 8 = 4x Unit Type string (approx two characters) // 2 = 2x separator characters if (_unitType == GridUnitType.Auto) { return("Auto"); } else if (_unitType == GridUnitType.Pixel) { return(Convert.ToString(_unitValue, cultureInfo)); } else { return(Convert.ToString(_unitValue, cultureInfo) + "*"); } }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Bb.ApplicationCooperationViewPoint.ApplicationCooperationViewPointDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { default: break; } // end switch return(result); }
/// <summary> /// Returns a list of toolbox items for use with this DSL. /// </summary> /// Les items sont tous créés dans le designer et sont distingués par le nom du TabName qui correspond /// au diagramme associé. public override global::System.Collections.Generic.IList <DslDesign::ModelingToolboxItem> CreateToolboxItems() { IList <DslDesign::ModelingToolboxItem> toolboxItems = base.CreateToolboxItems(); // Create store and load domain models. using (DslModeling::Store store = new DslModeling::Store(this.ServiceProvider)) { store.LoadDomainModels(typeof(DslDiagrams::CoreDesignSurfaceDomainModel), typeof(global::DSLFactory.Candle.SystemModel.CandleDomainModel)); global::System.Resources.ResourceManager resourceManager = global::DSLFactory.Candle.SystemModel.CandleDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; // Parcours des toolbox items les associer au bon diagramme using (DslModeling::Transaction t = store.TransactionManager.BeginTransaction("CreateToolboxItems for modelsLayer")) { foreach (DslDesign::ModelingToolboxItem item in toolboxItems) { global::System.ComponentModel.ToolboxItemFilterAttribute[] filters = (global::System.ComponentModel.ToolboxItemFilterAttribute[])item.Filter; if (item.TabName == "Models") { filters[0] = new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxModelsFilterString); } if (item.TabName == "UILayer") { filters[0] = new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxUIFilterString); } } t.Rollback(); } } return(toolboxItems); }
private string ConvertToCustomTypeFromString(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::Debugging.CustomType value, global::System.Type type) { return(string.Format("H: {0}, W: {1}, D: {2}", value.Height, value.Width, value.Depth)); }
public static void revertDefaultCulture() { #line 49 "/opt/haxe/std/cs/Lib.hx" global::System.Globalization.CultureInfo ci = new global::System.Globalization.CultureInfo(((string)(global::System.Threading.Thread.CurrentThread.CurrentCulture.Name)), ((bool)(true))); global::System.Threading.Thread.CurrentThread.CurrentCulture = ((global::System.Globalization.CultureInfo)(ci)); }
/// <summary> /// Returns instance of ModelingToolboxItem based on specified name. /// This method must be called from within a Transaction. Failure to do so will result in an exception /// </summary> /// <param name="itemId">unique name of desired ToolboxItem</param> /// <param name="store">Store to perform the operation against</param> /// <returns>An instance of ModelingToolboxItem if the itemId can be resolved, null otherwise</returns> public virtual DslDesign::ModelingToolboxItem GetToolboxItem(string itemId, DslModeling::Store store) { DslDesign::ModelingToolboxItem result = null; if (string.IsNullOrEmpty(itemId)) { return(null); } if (store == null) { return(null); } global::System.Resources.ResourceManager resourceManager = global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager; global::System.Globalization.CultureInfo resourceCulture = global::System.Globalization.CultureInfo.CurrentUICulture; switch (itemId) { case "Microsoft.Data.Entity.Design.Package.EntityToolToolboxItem": // Add EntityTool shape tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Data.Entity.Design.Package.EntityToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 1, // Position relative to other items in the same toolbox tab. resourceManager.GetString("EntityToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("EntityToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Data.Entity.Design.Package.Entity FrameworkToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Entity FrameworkToolboxTab", resourceCulture), // Localized display name for the toolbox tab. string.Empty, // no F1 help keyword for the toolbox item. resourceManager.GetString("EntityToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. CreateElementToolPrototype(store, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType.DomainClassId), // ElementGroupPrototype (data object) representing model element on the toolbox. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require) }); break; case "Microsoft.Data.Entity.Design.Package.AssociationToolToolboxItem": // Add AssociationTool connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Data.Entity.Design.Package.AssociationToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 2, // Position relative to other items in the same toolbox tab. resourceManager.GetString("AssociationToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("AssociationToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Data.Entity.Design.Package.Entity FrameworkToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Entity FrameworkToolboxTab", resourceCulture), // Localized display name for the toolbox tab. string.Empty, // no F1 help keyword for the toolbox item. resourceManager.GetString("AssociationToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(AssociationToolFilterString) }); break; case "Microsoft.Data.Entity.Design.Package.InheritanceToolToolboxItem": // Add InheritanceTool connector tool. result = new DslDesign::ModelingToolboxItem( "Microsoft.Data.Entity.Design.Package.InheritanceToolToolboxItem", // Unique identifier (non-localized) for the toolbox item. 3, // Position relative to other items in the same toolbox tab. resourceManager.GetString("InheritanceToolToolboxItem", resourceCulture), // Localized display name for the item. (global::System.Drawing.Bitmap)DslDiagrams::ImageHelper.GetImage(resourceManager.GetObject("InheritanceToolToolboxBitmap", resourceCulture)), // Image displayed next to the toolbox item. "Microsoft.Data.Entity.Design.Package.Entity FrameworkToolboxTab", // Unique identifier (non-localized) for the toolbox item tab. resourceManager.GetString("Entity FrameworkToolboxTab", resourceCulture), // Localized display name for the toolbox tab. string.Empty, // no F1 help keyword for the toolbox item. resourceManager.GetString("InheritanceToolToolboxTooltip", resourceCulture), // Localized tooltip text for the toolbox item. null, // Connector toolbox items do not have an underlying data object. new global::System.ComponentModel.ToolboxItemFilterAttribute[] { // Collection of ToolboxItemFilterAttribute objects that determine visibility of the toolbox item. new global::System.ComponentModel.ToolboxItemFilterAttribute(ToolboxFilterString, global::System.ComponentModel.ToolboxItemFilterType.Require), new global::System.ComponentModel.ToolboxItemFilterAttribute(InheritanceToolFilterString) }); break; default: break; } // end switch return(result); }
/// <summary> /// Returns a list of toolbox items for use with this DSL. /// </summary> public virtual global::System.Collections.Generic.IList <DslDesign::ModelingToolboxItem> CreateToolboxItems() { global::System.Collections.Generic.List <DslDesign::ModelingToolboxItem> toolboxItems = new global::System.Collections.Generic.List <DslDesign::ModelingToolboxItem>(); // Create store and load domain models. using (DslModeling::Store store = new DslModeling::Store(this.ServiceProvider)) { store.LoadDomainModels(typeof(DslDiagrams::CoreDesignSurfaceDomainModel), typeof(global::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); }
public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, object value, global::System.Type type) { // IMPORTANT NOTE: The code below does not build by default. // This is a custom type validator that must be implemented // for it to build. Place the following in a separate file // and implement the method. // // public partial class CustomBlockTypeConverter // { // // private string ConvertToCustomBlockFromString(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::Samples.Configuration.ExternalTypes.CustomBlock value, global::System.Type type) // { // return value.ToString(); // } // } // return(this.ConvertToCustomBlockFromString(context, culture, ((global::Samples.Configuration.ExternalTypes.CustomBlock)(value)), type)); }
/// <summary> /// Converts the string representation of the custom type contained in the config value into the /// proper class. /// /// The RectangleTypeConverter partial class contained in the GENERATED code has a method called "ConvertFrom". /// This "ConvertFrom" method makes a call to "ConvertFromStringToRectangle". We actually implement the /// "ConvertFromStringToRectangle" method here. /// </summary> /// <param name="context"></param> /// <param name="culture"></param> /// <param name="value"></param> /// <returns></returns> private global::Samples.Configuration.ExternalTypes.CustomBlock ConvertFromStringToCustomBlock(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, string value) { var ct = new CustomBlock(); string[] values = value.Split(','); if (values.Length != 3) { throw new ArgumentException("Invalid input string"); } //H: 42, W: 314, D: 312 foreach (string val in values) { string[] keyValue = val.Split(':'); switch (keyValue[0].Trim().ToUpper()) { case "H": ct.Height = int.Parse(keyValue[1]); break; case "W": ct.Width = int.Parse(keyValue[1]); break; case "D": ct.Depth = int.Parse(keyValue[1]); break; default: throw new ArgumentException("Invalid input string"); } } return(ct); }
public override object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, object value) { // IMPORTANT NOTE: The code below does not build by default. // This is a custom type validator that must be implemented // for it to build. Place the following in a separate file // and implement the method. // // public partial class CustomTypeTypeConverter // { // // private global::Debugging.CustomType ConvertFromStringToCustomType(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, string value) // { // throw new global::System.NotImplementedException(); // } // } // return(this.ConvertFromStringToCustomType(context, culture, ((string)(value)))); }
/// <summary> /// We have to implement this abstract method, but it should never be called /// </summary> /// <param name="item">Item to get group name from</param> /// <param name="level">The level of grouping</param> /// <param name="culture">Culture used for sorting</param> /// <returns>We do not return a value here</returns> public override object GroupNameFromItem(object item, int level, global::System.Globalization.CultureInfo culture) { Debug.Assert(true, "We have to implement this abstract method, but it should never be called"); return(null); }