AGI Ui Plugins 11 Send comments on this topic.
IAgProgressTrackCancel Interface





Description

The interface represents the progress of a lengthy action.

Public Methods

Public Method BeginTracking Initialize the progress animation using specified behavior and appearance
Public Method EndTracking Ends the progress animation.
Public Method SetProgress Notifies of the progress of a time consuming operation.

Public Properties

Public Property Continue Returns whether to continue normal operation execution.

Remarks

IAgProgressTrackCancel interface provides methods and properties to control the progress animation in the hosting environment. The progress tracking is useful when a User Interface plugin needs to execute an action that may take some time to finish so in order to provide a feedback to the hosting environment, the plugin can use the progress tracking interface to visually indicate the current progress and allow the user cancel the action if it is taking too long.

Example

The example shows how to start the progress animation and set the current progress status and percentage.
Set the current progress status Copy Code
IAgProgressTrackCancel progress ; 
//  
progress.BeginTracking(AgEProgressTrackingOptions.eProgressTrackingOptionNone, AgEProgressTrackingType.eTrackAsProgressBar); 
 
for (int i = 0; i <= 100; i++) 

    progress.SetProgress(i, string.Format("Progress is at {0}...", i)); 
    Thread.Sleep(100); 
    if (!progress.Continue) 
    break

progress.EndTracking(); 

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1