Raises the ProgressChanged event to report the specified progress of the worker thread operation.

Namespace:  ESRI.ArcGISExplorer.Threading

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public void ReportProgress(
	int progress
)
Visual Basic (Declaration)
Public Sub ReportProgress ( _
	progress As Integer _
)

Parameters

progress
Type: System..::.Int32

An integer indicating the progress of the operation.

Remarks

If you wish to report on the progress of a longer-running background operation, call the ReportProgress from the DoWork event handler on the worker thread. Pass in an integer which represents the amount of progress so far - it is up to you to implement a meaningful way of measuring your worker thread operations progress using this value. Also make sure that an event handler is associated with the event.

The ReportProgress method is overloaded to allow also passing an optional message string which can then be shown on the progress dialog as well.

When the ProgressChanged event is raised the event handler will be called back on the UI thread; use the to find out the progress values passed in to this ProgressChanged method and report progress to the user.

This method helps you to write worker thread operations which do not interrupt the use of the application but still allow feedback in the user interface on the UI thread.

Note that not every call to ReportProgress is guaranteed to result in a ProgressChanged event being raised; in order to preserve responsiveness of the UI thread, ProgressChanged events are raised a minimum of a second apart.

See Also