/// <summary> /// Register a delegate that will be given a chance to create a control /// before any other option is considered. /// </summary> /// <param name="creator">The delegate that will create a control</param> public void RegisterFirstChance(EditorCreatorDelegate creator) { this.firstChanceCreator = creator; }
/// <summary> /// Register a delegate that will be called to create an editor for values /// that have not been handled. /// </summary> /// <param name="creator">The delegate that will create a editor for all other types</param> public void RegisterDefault(EditorCreatorDelegate creator) { this.defaultCreator = creator; }
/// <summary> /// Register the given delegate so that it is called to create editors /// for values of the given type /// </summary> /// <param name="type">The type of value to be edited</param> /// <param name="creator">The delegate that will create a control that can edit values of 'type'</param> /// <example> /// ObjectListView.EditorRegistry.Register(typeof(Color), CreateColorEditor); /// ... /// public Control CreateColorEditor(Object model, OLVColumn column, Object value) /// { /// return new MySpecialColorEditor(); /// } /// </example> public void Register(Type type, EditorCreatorDelegate creator) { this.creatorMap[type] = creator; }