Drawing3d documented Class Library

TaskCtrl.Commit(Int32, String) Method

Set up an rolluppoint and calls Commit with object = null. For the use of this method you have to override the method GetUndoData.

[Visual Basic]
Public Overloads Sub Commit( _
   ByVal id As Integer, _
   ByVal Text As String _
)
[C#]
public void Commit(
   int id,
   string Text
);

Parameters

id
Free programmable id
Text
Text which is associated to the action

Example

Curve C; class myUndoData { .... Curve ChangingCurve; xy pt; .... } override object GetUndoData(int id) { object result = new myUndoData(); if (id == 99) { Result.ChangingCurve = C; // save object Result.Pt = C.A; // save the old } } override void UnDo(int id, object Data) { myUdoData = Data as myUndoData; if (id == 99) { myUndoData.C.A = myUndoData.Pt; } } ... void Changeanobject() { // Commit before changing Commit(99,"Change A"); C.A = new xy(100,100); }

See Also

TaskCtrl Class | Drawing3d Namespace | TaskCtrl.Commit Overload List | Commit