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






Windows & Linux

Description

The interface represents the progress of a lengthy action.

Public Methods

Public Method BeginTrackingInitialize the progress animation using specified behavior and appearance
Public Method EndTrackingEnds the progress animation.
Public Method SetProgressNotifies of the progress of a time consuming operation.

Public Properties

Public Property ContinueReturns 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 statusCopy 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(); 

© 2019 Analytical Graphics, Inc. All Rights Reserved.