public object GetEditor(Type editorBaseType) { return(SelectedObject == null ? null : TypeDescriptor.GetEditor(SelectedObject, editorBaseType)); }
/// <summary> /// Creates an instance of the specified type in the collection. /// </summary> protected override object CreateInstance(Type type) { UITypeEditor editor = (UITypeEditor)TypeDescriptor.GetEditor(typeof(ImageListImage), typeof(UITypeEditor)); return(editor.EditValue(Context, null)); }
object ICustomTypeDescriptor.GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(this, editorBaseType, true)); }
object ICustomTypeDescriptor.GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(GetType(), editorBaseType)); }
public object GetEditor(Type editorBaseType) => TypeDescriptor.GetEditor(this, editorBaseType, true);
/// <summary> /// Returns an editor of the specified type for this instance of Asset. /// </summary> /// <param name="editorBaseType">A Type that represents the editor for this object. </param> /// <returns>An Object of the specified type that is the editor for this object, /// or null if the editor cannot be found.</returns> public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(m_asset, editorBaseType, false)); }
object ICustomTypeDescriptor.GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(this.Target, editorBaseType)); }
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(_ob, _ob.GetType())); }
object ICustomTypeDescriptor.GetEditor(Type type) { return(TypeDescriptor.GetEditor(this.column, type)); }
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(mCurrentSelectObject, editorBaseType)); }
protected override object CreateInstance(Type type) { return(((UITypeEditor)TypeDescriptor.GetEditor(ImageListImageType, typeof(UITypeEditor))).EditValue(Context, null)); }
Object ICustomTypeDescriptor.GetEditor(Type editorBaseType) => TypeDescriptor.GetEditor(this, editorBaseType, true);
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(mInstance, editorBaseType, bInherited)); }
public object GetEditor(object totest, Type editorBase) { return(TypeDescriptor.GetEditor(totest, editorBase)); }
object ICustomTypeDescriptor.GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(typeof(TextResource), editorBaseType)); }
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(_wrappedObject, editorBaseType)); }
object ICustomTypeDescriptor.GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(ConfigUnit, editorBaseType, true)); }
public Com2ExtendedUITypeEditor(Type baseType) { innerEditor = (UITypeEditor)TypeDescriptor.GetEditor(baseType, typeof(UITypeEditor)); }
internal virtual object CreateUIEditor(PropertyModelView.OptionItemPropertyDescriptor desc) { OptionItem item = desc.Item; // EditorAttribute editorAttribute = // TypeDescriptor.GetProperties(item, false)["Value"].Attributes[typeof(EditorAttribute)] // as EditorAttribute; // UITypeEditor coreEditor; // if (editorAttribute.EditorTypeName != "") { // //attribute set, get the converter that is set by the attribute // coreEditor = TypeDescriptor.GetProperties(item, false)["Value"].GetEditor(); // } else { // //no attribute, delegate to base // coreEditor = TypeDescriptor.GetConverter(item.Type); // } object editor = TypeDescriptor.GetEditor(desc.PropertyType, typeof(UITypeEditor)); UITypeEditor _delegate = editor as UITypeEditor; object editorOverride = item.GetAttribute(OptionItem.CUSTOM_TABLEITEM_EDITOR); if (editorOverride != null) { if (editorOverride is Type) { try { UITypeEditor o = System.Activator.CreateInstance((Type)editorOverride) as UITypeEditor; if (o != null) { _delegate = o; } } catch { Trace.WriteLine("Cannot create UI editor instance"); } } else if (editorOverride is string) { try { UITypeEditor o = System.Activator.CreateInstance(Type.GetType((string)editorOverride)) as UITypeEditor; if (o != null) { _delegate = o; } } catch { Trace.WriteLine("Cannot create UI editor instance"); } } else if (editorOverride is UITypeEditor) { _delegate = (UITypeEditor)editorOverride; } else { Trace.WriteLine("Invalid type for UI editor attribute"); } } // if(_delegate != null && _delegate is EnumUITypeEditor) { // IItemRenderer renderer = GetRenderer(item); // if(renderer != null) { // ((EnumUITypeEditor) _delegate).Renderer = renderer; // } // } bool supportNull = (bool)desc.Item.GetAttribute(OptionItem.SUPPORT_NULL_VALUE_ATTRIBUTE); bool supportUndef = (bool)desc.Item.GetAttribute(OptionItem.SUPPORT_UNDEFINED_VALUE_ATTRIBUTE); if (supportNull) { return(_delegate == null ? (supportUndef ? new UndefinedValueUITypeEditor() : editor) : new NullableUITypeEditor(_delegate)); } else { return(supportUndef ? new UndefinedValueUITypeEditor(_delegate) : _delegate); } }
object ICustomTypeDescriptor.GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(component, editorBaseType)); }
public object GetEditor(Type editorBaseType) { var o = TypeDescriptor.GetEditor(this, editorBaseType, true); return(o); }
/// <summary> /// Forward to the normal <see cref="Image" /> editor /// </summary> /// <param name="ItemType">ignored</param> /// <returns>A new <see cref="Image" /></returns> protected override object CreateInstance(Type ItemType) { UITypeEditor editor = ((UITypeEditor)TypeDescriptor.GetEditor(typeof(Image), typeof(UITypeEditor))); return((Image)editor.EditValue(base.Context, null)); }
/// <summary> /// Initializes a new instance of the <see cref='System.Windows.Forms.Design.ImageIndexEditor'/> class. /// </summary> public ImageIndexEditor() { // Get the type editor for images. We use the properties on // this to determine if we support value painting, etc. imageEditor = (UITypeEditor)TypeDescriptor.GetEditor(typeof(Image), typeof(UITypeEditor)); }
internal object GetEditor(object component, Type baseEditorType) { return(TypeDescriptor.GetEditor(component.GetType(), baseEditorType)); }
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(_sourceType, editorBaseType)); }
object ICustomTypeDescriptor.GetEditor(Type editorBaseType) { object o = TypeDescriptor.GetEditor(this, editorBaseType, true); return(o); }
public override object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(PropertyType, editorBaseType)); }
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(Object.GetType(), editorBaseType)); }
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(this, editorBaseType, true)); }
public object GetEditor(Type editorBaseType) { return(TypeDescriptor.GetEditor(_connectionStringBuilder, editorBaseType)); }