GoDiagram Web Reference
EndTransaction Method

true to terminate the transaction normally; false to abort it
the internal locale-neutral name for the transaction
a string describing the transaction, used for the IGoUndoableEdit.PresentationName
Stop the current transaction, either aborting it or committing it.
Syntax
'Declaration
 
Public Overridable Function EndTransaction( _
   ByVal commit As Boolean, _
   ByVal tname As String, _
   ByVal pname As String _
) As Boolean
public virtual bool EndTransaction( 
   bool commit,
   string tname,
   string pname
)

Parameters

commit
true to terminate the transaction normally; false to abort it
tname
the internal locale-neutral name for the transaction
pname
a string describing the transaction, used for the IGoUndoableEdit.PresentationName

Return Value

true for a committed top-level transaction
Remarks

If this call stops a top-level transaction, a value of false for commit just clears the information in the CurrentEdit. If commit is true for a top-level transaction, we mark the CurrentEdit complete, call CommitCompoundEdit, and add the resulting GoUndoManagerCompoundEdit to the list of compound edits that this undo manager is recording.

Committing a transaction when there have been some undos without corresponding redos will throw away the compound edits holding changes that happened after the current state, before adding this new compound edit to the undo manager's list of edits.

This method raises a GoDocument.Changed event for each of this undo manager's Documents, with a hint of FinishedTransaction, and with a GoChangedEventArgs.GoChangedEventArgs.Object that is the GoUndoManagerCompoundEdit that has been added to the list of AllEdits. Furthermore the GoChangedEventArgs.GoChangedEventArgs.OldValue will be the tname, and the GoChangedEventArgs.NewValue will be the pname. Similarly, if the transaction is aborted, either because commit is false or because there is no CurrentEdit to commit, all of the Documents get a AbortedTransaction Changed event. The values passed in the GoChangedEventArgs may all be null, however.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoUndoManager Class
GoUndoManager Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback