Class NodeEditorBase<T>
- Namespace
- NanoByte.StructureEditor.WinForms
- Assembly
- NanoByte.StructureEditor.WinForms.dll
Common base class for controls that edits a node in the structure.
public abstract class NodeEditorBase<T> : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, INodeEditor<T>, INodeEditor where T : class
Type Parameters
TThe type of element to edit.
- Inheritance
-
NodeEditorBase<T>
- Implements
-
INodeEditor<T>
- Derived
- Inherited Members
Constructors
NodeEditorBase()
protected NodeEditorBase()
Properties
CommandExecutor
An optional undo system to use for editing.
[Browsable(false)]
public virtual ICommandExecutor? CommandExecutor { get; set; }
Property Value
Target
The element to be edited.
[Browsable(false)]
public virtual T? Target { get; set; }
Property Value
- T
Methods
Bind(UriTextBox, PropertyPointer<Uri?>)
Binds a UriTextBox to an Uri property through the live editing and Undo system.
protected void Bind(UriTextBox control, PropertyPointer<Uri?> pointer)
Parameters
controlUriTextBoxThe control to hook up (is automatically added to Controls).
pointerPropertyPointer<Uri>Read/write access to the value the
controlrepresents.
Bind(CheckBox, PropertyPointer<bool>)
protected void Bind(CheckBox control, PropertyPointer<bool> pointer)
Parameters
controlCheckBoxThe control to hook up (is automatically added to Controls).
pointerPropertyPointer<bool>Read/write access to the value the
controlrepresents.
Bind(ComboBox, PropertyPointer<string?>)
protected void Bind(ComboBox control, PropertyPointer<string?> pointer)
Parameters
controlComboBoxThe control to hook up (is automatically added to Controls).
pointerPropertyPointer<string>Read/write access to the value the
controlrepresents.
Bind(Control, PropertyPointer<string?>)
Binds a WinForms control to a property through the live editing and Undo system.
protected void Bind(Control control, PropertyPointer<string?> pointer)
Parameters
controlControlThe control to hook up (is automatically added to Controls).
pointerPropertyPointer<string>Read/write access to the value the
controlrepresents.
Bind<TControl, TChild>(TControl, Func<TChild>)
Binds a INodeEditor<T> as child editor through the live editing and Undo system.
protected void Bind<TControl, TChild>(TControl control, Func<TChild> getTarget) where TControl : Control, INodeEditor<TChild> where TChild : class
Parameters
controlTControlThe control to hook up (is automatically added to Controls).
getTargetFunc<TChild>Callback to retrieve the (child) target of the
control.
Type Parameters
TControlThe specific INodeEditor<T> type.
TChildThe type the child editor handles.
Refresh()
Forces the control to invalidate its client area and immediately redraw itself and any child controls.
public override void Refresh()
Events
CommandExecutorChanged
Is raised when CommandExecutor has been changed.
protected event Action? CommandExecutorChanged
Event Type
OnRefresh
Is raised when Refresh() is called.
protected event Action? OnRefresh
Event Type
TargetChanged
Is raised when Target has been changed.
protected event Action? TargetChanged