Exemplo n.º 1
0
 public static UITypeEditor GetEditor(IToolBoxProperty property)
 {
     if (property.Name == "Alpha"
         || property.Name == "BorderAlpha"
         || property.Name == "BackgroudAlpha")
     {
         return new AlphaEditor(property);
     }
     else if (property.Name == "BackgroudImage")
     {
         return new ImageEditor(property);
     }
     else if (property.Name == PropertyUtility.DYNAMICNAME
         && property.ComponentType == typeof(FlashProperty))
     {
         return new FlashEditor(property);
     }
     else if (property.Name == "Size")
     {
         return new SizeEditor(property);
     }
     else if (property.ValueType == PropertyValueType.enumtype)
     {
         return new EnumEditor(property);
     }
     else if (property.ValueType == PropertyValueType.color)
     {
         return new ColorEditor(property);
     }
     else if (property.Name == "Location"
         || property.Name == "ZIndex"
         || property.Name == "Id")
     {
         return new UITypeEditor();
     }
     else
     {
         return new DataEditor(property);
     }
 }
Exemplo n.º 2
0
 private TypeConverter GetPropertyConverter(IToolBoxProperty property)
 {
     switch (property.ValueType)
     {
         case PropertyValueType.boolean:
             return new BooleanConverter();
         case PropertyValueType.number:
             return new DoubleConverter();
         case PropertyValueType.xml:
         case PropertyValueType.url:
         case PropertyValueType.str:
             return new StringConverter();
         case PropertyValueType.color:
             return new ColorConverter();
         case PropertyValueType.point:
             var convert = new PointConvert();
             convert.Property = property;
             return convert;
         default:
             return null;
     }
 }
Exemplo n.º 3
0
 public ImageEditor(IToolBoxProperty property)
     : base()
 {
     Property = property;
 }
Exemplo n.º 4
0
 public AlphaEditor(IToolBoxProperty property)
     : base()
 {
     Property = property;
 }
 protected virtual PropertyDescriptor CreateProperty(IToolBoxProperty binding)
 {
     var attrs = CreateAttributes(binding.Category, binding.Description,
         binding.Visible, binding.Description, binding.ReadOnly);
     var newAttrs = new Attribute[attrs.Length + 1];
     attrs.CopyTo(newAttrs, 0);
     newAttrs[newAttrs.Length - 1] = new TypeConverterAttribute(typeof(PropertyConvert));
     var descriptor = new ToolBoxPropertyDescriptor(binding, binding.Name, newAttrs);
     return descriptor;
 }
 public ToolBoxPropertyDescriptor(IToolBoxProperty property, string name, Attribute[] attrs)
     : base(name, attrs)
 {
     Property = property;
 }
Exemplo n.º 7
0
 public ColorEditor(IToolBoxProperty property)
     : base()
 {
     Property = property;
 }
Exemplo n.º 8
0
 public EnumEditor(IToolBoxProperty property)
     : base()
 {
     Property = property;
 }
Exemplo n.º 9
0
 public FlashEditor(IToolBoxProperty property)
     : base()
 {
     Property = property;
 }