OperationProgressBar Class

The ProgressBar class implements progress bar with cancel button.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.OperationsOperationProgressBar

Namespace:  Tekla.Structures.Model.Operations
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
public class ProgressBar

The OperationProgressBar type exposes the following members.

Constructors
  NameDescription
Public methodOperationProgressBar
Initializes a new instance of the OperationProgressBar class
Top
Methods
  NameDescription
Public methodCanceled
Check if cancel has been pressed.
Public methodClose
Close progress bar. Can be called even if Display was not successful.
Public methodDisplay
Display progress bar dialog with cancel button. Display will fail if progress bar is already displayed.
Public methodSetProgress
Update status information on the progress bar.
Top
Examples
The following example displays progress bar, updates progress, checks if cancel has been pressed and closes the progress bar.
var progress = new Tekla.Structures.Model.Operations.Operation.ProgressBar();
bool displayResult = progress.Display(100, "title", "message", "cancel..", " ");
// looping ii from 0 to totalCount-1
{
    if (ii % 20 == 0) // progress update every 20th item
    {
        if (progress.Canceled())
        {
            break;
        }
        progress.SetProgress(ii.ToString(), 100*ii/totalCount);
    }
}
progress.Close();
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next