IProgressMonitor Abstract Class
The object of this class is a progress monitor. It displays a task's calculated progress in the UI and checks if the user has requested to abort the computation. Use this object for computations that take a long time to complete or if the UI might freeze during 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
This class provides the following functionality and abort interaction:
- SetTaskName (string taskName)
- SetSubTaskName (string subTaskName)
- BeginTask (string name)
- SetTaskProgressPercentage(int progressPercent)
- CheckForAbort()
- EndTask (bool passFail)
Example:
progMon.BeginTask("Process DQS")
progMon.SetSubTaskName("Compute UI segments")
progMon.SetTaskProgressPercentage(33)
progMon.SetSubTaskName("Compute the rest")
progMon.SetTaskProgressPercentage(100)
progMon.EndTask(True)