public override void Add(Type designType, Type toolboxType) { var info = new PropertyEditorInformation { ToolboxTypeName = toolboxType.FullName, DesignTypeName = designType.FullName, }; PropertyEditors.Add(info); }
public override void Add(string designTypeName, string toolboxTypeName) { var info = new PropertyEditorInformation { ToolboxTypeName = toolboxTypeName, DesignTypeName = designTypeName, }; PropertyEditors.Add(info); }
private IPropertyEditorModel CreateTypeEditorModel(PropertyEditorInformation info) { // todo:should check if the toolbox type would like to use another type editor; // ie in the case of a guid registered to a string and not an object var toolboxType = _typeFinder.Find(info.ToolboxTypeName); var modelType = typeof(PropertyEditorModel <>); var genType = modelType.MakeGenericType(toolboxType); var model = Activator.CreateInstance(genType) as IPropertyEditorModel; return(model); }