IProgressMonitor Abstract Class
The object of this class is a progress monitor. It is used to display calculations progress in the software application and to check if the user has requested an abort of the computation.
When displayed in the application, each progress message has four items:
- A task name
- A sub-task name
- The progress amount
- A button to abort the task in progress.
All of this functionality and abort interaction is achieved using the following functions:
SetTaskName
(string taskName):SetSubTaskName
(string subTaskName)BeginTask
(string name)SetTaskProgressPercentage
(intprogressPercent
)CheckForAbort()
: If the quantities being generated are computationally expensive, the UDO author can periodically call this method and then callEndTask
withFail
and returnFalse
.EndTask
(boolpassFail
)
Example:
progMon.BeginTask("Process DQS")
progMon.SetSubTaskName("Compute UI segments")
progMon.SetTaskProgressPercentage(33)
progMon.SetSubTaskName("Compute the rest")
progMon.SetTaskProgressPercentage(100)
progMon.EndTask(True)