Class NodeEditorBase<T>
Common base class for controls that edits a node in the structure.
Namespace: NanoByte.StructureEditor.WinForms
Assembly: NanoByte.StructureEditor.WinForms.dll
Syntax
public abstract class NodeEditorBase<T> : UserControl, INodeEditor<T>, INodeEditor where T : class
Type Parameters
Name | Description |
---|---|
T | The type of element to edit. |
Constructors
NodeEditorBase()
Declaration
protected NodeEditorBase()
Properties
CommandExecutor
An optional undo system to use for editing.
Declaration
public virtual ICommandExecutor CommandExecutor { get; set; }
Property Value
Type | Description |
---|---|
ICommandExecutor |
Target
The element to be edited.
Declaration
public virtual T Target { get; set; }
Property Value
Type | Description |
---|---|
T |
Methods
Bind(UriTextBox, PropertyPointer<Uri>)
Binds a UriTextBox to an Uri property through the live editing and Undo system.
Declaration
protected void Bind(UriTextBox control, PropertyPointer<Uri> pointer)
Parameters
Type | Name | Description |
---|---|---|
UriTextBox | control | The control to hook up (is automatically added to Controls). |
PropertyPointer<Uri> | pointer | Read/write access to the value the |
Bind(CheckBox, PropertyPointer<Boolean>)
Declaration
protected void Bind(CheckBox control, PropertyPointer<bool> pointer)
Parameters
Type | Name | Description |
---|---|---|
CheckBox | control | The control to hook up (is automatically added to Controls). |
PropertyPointer<Boolean> | pointer | Read/write access to the value the |
Bind(ComboBox, PropertyPointer<String>)
Declaration
protected void Bind(ComboBox control, PropertyPointer<string> pointer)
Parameters
Type | Name | Description |
---|---|---|
ComboBox | control | The control to hook up (is automatically added to Controls). |
PropertyPointer<String> | pointer | Read/write access to the value the |
Bind(Control, PropertyPointer<String>)
Binds a WinForms control to a property through the live editing and Undo system.
Declaration
protected void Bind(Control control, PropertyPointer<string> pointer)
Parameters
Type | Name | Description |
---|---|---|
Control | control | The control to hook up (is automatically added to Controls). |
PropertyPointer<String> | pointer | Read/write access to the value the |
Bind<TControl, TChild>(TControl, Func<TChild>)
Binds a INodeEditor<T> as child editor through the live editing and Undo system.
Declaration
protected void Bind<TControl, TChild>(TControl control, Func<TChild> getTarget)
where TControl : Control, INodeEditor<TChild> where TChild : class
Parameters
Type | Name | Description |
---|---|---|
TControl | control | The control to hook up (is automatically added to Controls). |
Func<TChild> | getTarget | Callback to retrieve the (child) target of the |
Type Parameters
Name | Description |
---|---|
TControl | The specific INodeEditor<T> type. |
TChild | The type the child editor handles. |
Refresh()
Declaration
public override void Refresh()
Events
CommandExecutorChanged
Is raised when CommandExecutor has been changed.
Declaration
protected event Action CommandExecutorChanged
Event Type
Type | Description |
---|---|
Action |
OnRefresh
Is raised when Refresh() is called.
Declaration
protected event Action OnRefresh
Event Type
Type | Description |
---|---|
Action |
TargetChanged
Is raised when Target has been changed.
Declaration
protected event Action TargetChanged
Event Type
Type | Description |
---|---|
Action |