GPPointFileInfo\TrackCancel.vb
Creating a non-trival custom GP tool - inputs, outputs, and responding to environment settings
GPPointFileInfo\TrackCancel.vb
' Copyright 2008 ESRI
' 
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
' 
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
' 
' See use restrictions at <your ArcGIS install location>/developerkit/userestrictions.txt.
' 

Imports Microsoft.VisualBasic
Imports System
Namespace GPPointFileInfo
  Public Class TrackCancel
        Implements GPPointFileInfo.ITrackCancel
    Private _trackCancel As ESRI.ArcGIS.esriSystem.ITrackCancel

    Public Sub New(ByVal trackCancel As ESRI.ArcGIS.esriSystem.ITrackCancel)
      _trackCancel = trackCancel
    End Sub

        Public ReadOnly Property IsCancelPressed() As Boolean Implements ITrackCancel.IsCancelPressed
            Get
                Return Not (_trackCancel.Continue())
            End Get
        End Property

        Public Sub Cancel() Implements ITrackCancel.Cancel
            _trackCancel.Cancel()
        End Sub
  End Class
End Namespace