Provides access to Traverse Window events. Implement it to listen to specific events that occur when the Traverse Window is used.
Product Availability
Available with ArcGIS Desktop.
Members
Description | ||
---|---|---|
OnActivate | Called when the Traverse Window dialog is activated. | |
OnAddCourse | Called after the course is added. | |
OnChangeCourseType | Called when the course type changes. | |
OnChangeCurveDirectionType | Called when the curve direction type changes. | |
OnChangeCurveParameter | Called when a curve parameter is changed for either the tangent curve or curve course. | |
OnChangeTurnDirection | Called when the turn direction is changed. | |
OnDeactivate | Called when the Traverse Window dialog is deactivated. | |
OnLoadTraverse | Called when a traverse is added from a text file. | |
OnPositionChanged | Called when the position of the Traverse Window dialog changes. | |
OnSetFinishPoint | Called when the finish point of the traverse is set. | |
OnSetFocusToMeasure | Called when the focus is set to one of the measure text controls. | |
OnSetStartPoint | Called when the start point of the traverse is set. |
CoClasses that implement ITraverseWindowEvents
CoClasses and Classes | Description |
---|---|
TraverseWindow | Dialog for creating traverses. |
[C#]
The following code shows an example of wiring traverse window events in C#.
public void WireTraverseWindowEvents()
{
//You can get app from ICommand :: OnCreate() hook parameter
UID editorUid = new UIDClass();
editorUid.Value = "esriEditor.Editor";
IEditor editor = app.FindExtensionByCLSID(editorUid) as IEditor;
//Get a reference to the traverse window
UID extUid = new UIDClass();
extUid.Value = "esriEditor.TraverseWindow";
ITraverseWindow traverseWindow = editor.FindExtension(extUid) as ITraverseWindow;
//Wire traverse window events
((ITraverseWindowEvents_Event)traverseWindow).OnAddCourse += new ITraverseWindowEvents_OnAddCourseEventHandler(OnAddCourse);
}
void OnAddCourse()
{
System.Windows.Forms.MessageBox.Show("Course added");
}
[Visual Basic .NET]
The following code shows an example of wiring traverse window events in VBNet.
Public Sub WireTraverseWindowEvents()
'You can get app from ICommand :: OnCreate() hook parameter
Dim editorUid As UID = New UIDClass()
editorUid.Value = "esriEditor.Editor"
Dim editor As IEditor = TryCast(app.FindExtensionByCLSID(editorUid), IEditor)
'Get a reference to the traverse window
Dim extUid As UID = New UIDClass()
extUid.Value = "esriEditor.TraverseWindow"
Dim traverseWindow As ITraverseWindow = TryCast(editor.FindExtension(extUid), ITraverseWindow)
'Wire traverse window events
AddHandler (CType(traverseWindow, ITraverseWindowEvents_Event).OnAddCourse), _
AddressOf OnAddCourse
End Sub
Private Sub OnAddCourse()
System.Windows.Forms.MessageBox.Show("Course added.")
End Sub