Class SetTextCmd
Set text commands
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class SetTextCmd : ICommand
Constructors
SetTextCmd(TextEditor, Node, Int32, String, String)
Initializes a new instance of the SetTextCmd class.
Declaration
public SetTextCmd(TextEditor textEditor, Node nodeEditing, int nInsertionLocation, string strDeletedText, string strTextToInsert)
Parameters
Type | Name | Description |
---|---|---|
TextEditor | textEditor | The text editor. |
Node | nodeEditing | The node editing. |
System.Int32 | nInsertionLocation | The n insertion location. |
System.String | strDeletedText | The deleted text. |
System.String | strTextToInsert | The text to insert. |
Fields
m_nInsertionStart
Declaration
protected int m_nInsertionStart
Field Value
Type |
---|
System.Int32 |
m_nodeEditing
Declaration
protected Node m_nodeEditing
Field Value
Type |
---|
Node |
m_strDeleted
Declaration
protected string[] m_strDeleted
Field Value
Type |
---|
System.String[] |
m_strDescription
Declaration
protected string m_strDescription
Field Value
Type |
---|
System.String |
m_strToInsert
Declaration
protected string[] m_strToInsert
Field Value
Type |
---|
System.String[] |
m_txtEditor
Declaration
protected TextEditor m_txtEditor
Field Value
Type |
---|
TextEditor |
Properties
CanUndo
Gets a value indicating whether or not the command supports undo.
Declaration
public virtual bool CanUndo { get; }
Property Value
Type |
---|
System.Boolean |
Description
Gets short, user-friendly description of the command.
Declaration
public string Description { get; }
Property Value
Type |
---|
System.String |
InsertionLocation
Gets the insertion location.
Declaration
public int InsertionLocation { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The insertion location. |
NodeEditing
Gets the node editing.
Declaration
public INode NodeEditing { get; }
Property Value
Type | Description |
---|---|
INode | The node editing. |
RTFTextDeleted
Gets the RTF text deleted.
Declaration
public string RTFTextDeleted { get; }
Property Value
Type | Description |
---|---|
System.String | The RTF text deleted. |
RTFTextInserting
Gets the RTF text inserting.
Declaration
public string RTFTextInserting { get; }
Property Value
Type | Description |
---|---|
System.String | The RTF text inserting. |
TextDeleted
Gets the text deleted.
Declaration
public string TextDeleted { get; }
Property Value
Type | Description |
---|---|
System.String | The text deleted. |
TextInserting
Gets the text inserting.
Declaration
public string TextInserting { get; }
Property Value
Type | Description |
---|---|
System.String | The text inserting. |
Methods
CanMerge(ICommand)
Determines whether this instance can merge the specified command to previous recorded command.
Declaration
public virtual bool CanMerge(ICommand cmd)
Parameters
Type | Name | Description |
---|---|---|
ICommand | cmd | The command to merge. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ComposeRtfString(String[])
Composes the RTF string.
Declaration
protected string ComposeRtfString(string[] arrString)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | arrString | The string array. |
Returns
Type | Description |
---|---|
System.String | The RTF string. |
ComposeString(String[])
Composes the string.
Declaration
protected string ComposeString(string[] arrString)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | arrString | The string array. |
Returns
Type | Description |
---|---|
System.String | The string |
Do(Object)
Performs the action.
Declaration
public virtual bool Do(object target)
Parameters
Type | Name | Description |
---|---|---|
System.Object | target | Object that is acted upon. |
Returns
Type | Description |
---|---|
System.Boolean | True if successful; otherwise False. |
Merge(ICommand)
Merges the specified merging command.
Declaration
public virtual void Merge(ICommand cmdMerging)
Parameters
Type | Name | Description |
---|---|---|
ICommand | cmdMerging | The merging command. |
Undo()
Reverses the command.
Declaration
public virtual bool Undo()
Returns
Type | Description |
---|---|
System.Boolean | True if successful; otherwise False. |