/// <summary> /// Creates a property for all other properties /// </summary> /// <param name="pinfo">Information about the property</param> /// <param name="box">Box where it finds the other property</param> /// <param name="bag">Bag where to put the propertyspec</param> protected void CreateOtherProperty(PropertyInfo pinfo, IBoxModule box, PropertyTable bag) { FerdaPropertySpec ps; SocketInfo si = box.MadeInCreator.GetSocket(pinfo.name); ps = new FerdaPropertySpec(si.label, typeof(OtherProperty), false); ps.Description = si.hint; ps.Category = pinfo.categoryName; //properties that user can set without executing the module (ODBC Connection string) if (box.IsPossibleToSetWithAbout(pinfo.name)) //using a OtherPropertyAddingConverter { if (box.IsPropertyReadOnly(pinfo.name) || box.GetPropertySocking(pinfo.name)) { ps.Attributes = new Attribute[] { ReadOnlyAttribute.Yes, new TypeConverterAttribute(typeof(OtherPropertyAddingConverter)), new EditorAttribute(typeof(OtherPropertyEditor), typeof(System.Drawing.Design.UITypeEditor)) }; } else { ps.Attributes = new Attribute[] { new TypeConverterAttribute(typeof(OtherPropertyAddingConverter)), new EditorAttribute(typeof(OtherPropertyEditor), typeof(System.Drawing.Design.UITypeEditor)) }; } } else //using a OtherPropertyConverter { if (box.IsPropertyReadOnly(pinfo.name) || box.GetPropertySocking(pinfo.name)) { ps.Attributes = new Attribute[] { ReadOnlyAttribute.Yes, new TypeConverterAttribute(typeof(OtherPropertyConverter)), new EditorAttribute(typeof(OtherPropertyEditor), typeof(System.Drawing.Design.UITypeEditor)) }; } else { ps.Attributes = new Attribute[] { new TypeConverterAttribute(typeof(OtherPropertyConverter)), new EditorAttribute(typeof(OtherPropertyEditor), typeof(System.Drawing.Design.UITypeEditor)) }; } } if (IsOneBoxSelected) { AddAsyncTemporary(pinfo.name, "Ferda.FrontEnd.Properties.OtherProperty", false); } bag.Properties.Add(ps); }