OperationProgressBar Class |
The ProgressBar class implements progress bar with cancel button.
Inheritance Hierarchy
Namespace: Tekla.Structures.Model.Operations
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The OperationProgressBar type exposes the following members.
Constructors
Name | Description | |
---|---|---|
OperationProgressBar | Initializes a new instance of the OperationProgressBar class |
Methods
Name | Description | |
---|---|---|
Canceled |
Check if cancel has been pressed.
| |
Close |
Close progress bar. Can be called even if Display was not successful.
| |
Display |
Display progress bar dialog with cancel button.
Display will fail if progress bar is already displayed.
| |
SetProgress |
Update status information on the progress bar.
|
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