Class ValidatingTextEditor
- Namespace
- NanoByte.StructureEditor.WinForms
- Assembly
- NanoByte.StructureEditor.WinForms.dll
A text editor that automatically validates changes using an external callback after a short period of no input.
public class ValidatingTextEditor : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
- Inheritance
-
objectValidatingTextEditor
- Implements
- Inherited Members
Constructors
ValidatingTextEditor()
public ValidatingTextEditor()
Properties
EnableRedo
Indicates whether Redo() is currently available.
public bool EnableRedo { get; }
Property Value
EnableUndo
Indicates whether Undo() is currently available.
public bool EnableUndo { get; }
Property Value
TextEditor
The text editor control used internally.
public TextEditorControl TextEditor { get; }
Property Value
- TextEditorControl
Methods
ClearUndoStack()
Clears the undo stack of the underlying text editor control.
public void ClearUndoStack()
Dispose(bool)
Releases the unmanaged resources used by the Control and its child controls and optionally releases the managed resources.
protected override void Dispose(bool disposing)
Parameters
disposingbooltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
Redo()
Executes the redo method of the underlying text editor control.
public void Redo()
SetContent(string, IStructureSerializer)
Sets a new text to be edited.
public void SetContent(string text, IStructureSerializer serializer)
Parameters
textstringThe text to set.
serializerIStructureSerializerThe serializer that produced the text. Determines the highlighting scheme and is used to locate errors.
Undo()
Executes the undo method of the underlying text editor control.
public void Undo()
Events
ContentChanged
Raised when changes have accumulated after a short period of no input.
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Cannot rename System.Action<T>")]
public event Action<string>? ContentChanged