Class HistoryManager
Manager used to record all user actions to return to primary document.
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class HistoryManager : Service
Constructors
HistoryManager(Model)
Initializes a new instance of the HistoryManager class.
Declaration
public HistoryManager(Model model)
Parameters
Type | Name | Description |
---|---|---|
Model | model | The model. |
Fields
m_history
Declaration
protected HistoryList m_history
Field Value
Type |
---|
HistoryList |
Properties
CanRedo
Gets a value indicating whether this instance can redo last backup user operation.
Declaration
public bool CanRedo { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
CanUndo
Gets a value indicating whether this instance can undo last operation.
Declaration
public bool CanUndo { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Enabled
Gets or sets a value indicating whether the history services is enabled or disabled.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
AddHistoryEntry(ICommand)
Adding new entry into the history entry list
Declaration
public void AddHistoryEntry(ICommand cmdNewEntry)
Parameters
Type | Name | Description |
---|---|---|
ICommand | cmdNewEntry | The new command |
CanMerge(ICommand)
Determines whether this instance can merge the specified command.
Declaration
public bool CanMerge(ICommand cmd)
Parameters
Type | Name | Description |
---|---|---|
ICommand | cmd | The command. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ClearHistory()
Clear all the history records.
Declaration
public void ClearHistory()
EndAtomicAction()
Stop recording changes and save command to history.
Declaration
public void EndAtomicAction()
GetRedoDescriptions(Int32, out String[])
Gets HistoryEntries Descriptions.
Declaration
public int GetRedoDescriptions(int nDepth, out string[] strCmdDescriptions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nDepth | Depth proceed. |
System.String[] | strCmdDescriptions | string array which holds descriptions |
Returns
Type | Description |
---|---|
System.Int32 | Number of returned descriptions. |
GetUndoDescriptions(Int32, out String[])
Gets HistoryEntries Descriptions.
Declaration
public int GetUndoDescriptions(int nDepth, out string[] strCmdDescriptions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nDepth | Depth proceed. |
System.String[] | strCmdDescriptions | string array which holds descriptions |
Returns
Type | Description |
---|---|
System.Int32 | Number of returned descriptions. |
Merge(ICommand)
Merges the specified command to one.
Declaration
public void Merge(ICommand cmdToMerge)
Parameters
Type | Name | Description |
---|---|---|
ICommand | cmdToMerge | The command to merge. |
OnRecordComplete(EventArgs)
Raises the RecordComplete event.
Declaration
protected virtual void OnRecordComplete(EventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | evtArgs | The System.EventArgs instance containing the event data. |
OnRecordRequest(EventArgs)
Raises the RecordRequest event.
Declaration
protected virtual void OnRecordRequest(EventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | evtArgs | The System.EventArgs instance containing the event data. |
OnRedoCommandCompleted(EventArgs)
Raises the RedoCommandCompleted event.
Declaration
protected virtual void OnRedoCommandCompleted(EventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | evtArgs | The System.EventArgs instance containing the event data. |
OnRedoCommandStarted(EventArgs)
Raises the RedoCommandStarted event.
Declaration
protected virtual void OnRedoCommandStarted(EventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | evtArgs | The System.EventArgs instance containing the event data. |
OnStop()
Called when history are stopped.
Declaration
protected override void OnStop()
Overrides
OnUndoCommandCompleted(EventArgs)
Raises the UndoCommandCompleted event.
Declaration
protected virtual void OnUndoCommandCompleted(EventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | evtArgs | The System.EventArgs instance containing the event data. |
OnUndoCommandStarted(EventArgs)
Raises the UndoCommandStarted event.
Declaration
protected virtual void OnUndoCommandStarted(EventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | evtArgs | The System.EventArgs instance containing the event data. |
RecordCollectionChanged(CollectionExChangeType, CollectionEx, ICollection, Int32)
Record the collection changed action.
Declaration
public void RecordCollectionChanged(CollectionExChangeType changeType, CollectionEx collection, ICollection elements, int nIndex)
Parameters
Type | Name | Description |
---|---|---|
CollectionExChangeType | changeType | Type of the change. |
CollectionEx | collection | The changed collection. |
System.Collections.ICollection | elements | The elements of collection. |
System.Int32 | nIndex | The elements insert index. |
RecordMoveHandle(PathNode)
Record the handler move action.
Declaration
public void RecordMoveHandle(PathNode pathNode)
Parameters
Type | Name | Description |
---|---|---|
PathNode | pathNode | The handler container. |
RecordMovePinPoint(IPropertyContainer, String, String, SizeF)
Record the move pin point action.
Declaration
public void RecordMovePinPoint(IPropertyContainer propertyContainer, string strPropertyContainerName, string strPropertyName, SizeF szMoveOffset)
Parameters
Type | Name | Description |
---|---|---|
IPropertyContainer | propertyContainer | The property container. |
System.String | strPropertyContainerName | Name of the container. |
System.String | strPropertyName | Name of the property. |
System.Drawing.SizeF | szMoveOffset | The pin point move offset. |
RecordPropertyChanged(IPropertyContainer, String, String)
Record the property changed action.
Declaration
public void RecordPropertyChanged(IPropertyContainer propertyContainer, string strPropertyContainerName, string strPropertyName)
Parameters
Type | Name | Description |
---|---|---|
IPropertyContainer | propertyContainer | The property container. |
System.String | strPropertyContainerName | Name of the property container. |
System.String | strPropertyName | Name of the property. |
RecordSetGraphicsPath(PathNode, GraphicsPath, GraphicsPath, Boolean)
Record the set graphics path action.
Declaration
public void RecordSetGraphicsPath(PathNode nodePath, GraphicsPath pathCurrent, GraphicsPath pathToCombineWith, bool bConnect)
Parameters
Type | Name | Description |
---|---|---|
PathNode | nodePath | The graphics path owner. |
System.Drawing.Drawing2D.GraphicsPath | pathCurrent | The path current. |
System.Drawing.Drawing2D.GraphicsPath | pathToCombineWith | The path to combine with. |
System.Boolean | bConnect | if set to |
RecordSetPoints(PathNode)
Record the set points action.
Declaration
public void RecordSetPoints(PathNode nodePath)
Parameters
Type | Name | Description |
---|---|---|
PathNode | nodePath | The path points owner. |
RecordVertexChanged(PathNode, VertexChangeType, Int32, PointF)
Record the vertex changed.
Declaration
public void RecordVertexChanged(PathNode nodeVertexContainer, VertexChangeType changeType, int nVertexIdx, PointF ptNewLocation)
Parameters
Type | Name | Description |
---|---|---|
PathNode | nodeVertexContainer | The node vertex container. |
VertexChangeType | changeType | Type of the change. |
System.Int32 | nVertexIdx | The vertex index in path points array. |
System.Drawing.PointF | ptNewLocation | The new vertex location. |
RecordZorderChanged(Node, ZOrderUpdate)
Record the zOrder changed value.
Declaration
public void RecordZorderChanged(Node nodeChanged, ZOrderUpdate changeType)
Parameters
Type | Name | Description |
---|---|---|
Node | nodeChanged | The node changed. |
ZOrderUpdate | changeType | Type of the change. |
Redo()
Step forward to operation history records.
Declaration
public bool Redo()
Returns
Type | Description |
---|---|
System.Boolean | true, if redo. |
StartAtomicAction(String)
Start record any changes to history command.
Declaration
public void StartAtomicAction(string strDescription)
Parameters
Type | Name | Description |
---|---|---|
System.String | strDescription | The short command description. |
Undo()
Backup last user operation.
Declaration
public bool Undo()
Returns
Type | Description |
---|---|
System.Boolean | true, if undo. |
Events
RecordComplete
Occurs when record complete.
Declaration
public event EventHandler RecordComplete
Event Type
Type |
---|
System.EventHandler |
RecordRequest
Occurs when record request.
Declaration
public event EventHandler RecordRequest
Event Type
Type |
---|
System.EventHandler |
RedoCommandCompleted
Occurs when redo command completed.
Declaration
public event EventHandler RedoCommandCompleted
Event Type
Type |
---|
System.EventHandler |
RedoCommandStarted
Occurs when redo command started.
Declaration
public event EventHandler RedoCommandStarted
Event Type
Type |
---|
System.EventHandler |
UndoCommandCompleted
Occurs when undo command completed.
Declaration
public event EventHandler UndoCommandCompleted
Event Type
Type |
---|
System.EventHandler |
UndoCommandStarted
Occurs when undo command started.
Declaration
public event EventHandler UndoCommandStarted
Event Type
Type |
---|
System.EventHandler |