Skip to content

Commit

Permalink
Interfacebuilder bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
apobekiaris committed Dec 28, 2012
1 parent fd88dda commit 6738485
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,19 @@ string GetAttributeCode(object attribute, DynamicModelPropertyInfo info) {
var typeConverterAttribute = attribute as TypeConverterAttribute;
if (typeConverterAttribute != null) {
var type = Type.GetType((typeConverterAttribute).ConverterTypeName);
if (type != null && type.IsPublic)
if (type != null && type.IsPublic && !type.FullName.Contains(".Design."))
return string.Format("{1}(typeof({0}))", type.FullName, TypeToString(attribute.GetType()));
return null;
}
Type attributeType = attribute.GetType();
// if (attributeType == typeof(DXDescriptionAttribute)) {
// string description = ((DXDescriptionAttribute)attribute).Description.Replace(@"""", @"""""");
// return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute)));
// }
// if (typeof(DescriptionAttribute).IsAssignableFrom(attributeType)) {
// string description = ((DescriptionAttribute)attribute).Description.Replace(@"""", @"""""");
// return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute)));
// }
if (attributeType == typeof(DXDescriptionAttribute)) {
string description = ((DXDescriptionAttribute)attribute).Description.Replace(@"""", @"""""");
return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute)));
}
if (typeof(DescriptionAttribute).IsAssignableFrom(attributeType)) {
string description = ((DescriptionAttribute)attribute).Description.Replace(@"""", @"""""");
return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute)));
}
if (attributeType == typeof(DefaultValueAttribute)) {
string value = GetStringValue(((DefaultValueAttribute)attribute).Value);
return string.Format(@"System.ComponentModel.DefaultValue({0})", value);
Expand Down

0 comments on commit 6738485

Please sign in to comment.