WorkUnit.UpdateProgressAndCheckCancelled Method

Updates the progress bar value and checks if the worker thread has been canceled.
Protected Friend Function UpdateProgressAndCheckCancelled( _ 
ByVal current As Integer, _ 
ByVal total As Integer, _ 
ByVal text As String, _ 
ByVal worker As BackgroundWorker, _ 
ByVal doWorkEventArgs As DoWorkEventArgs, _ 
Optional ByVal forceUpdate As Boolean = false, _ 
ByVal ParamArray args As String() _ 
) As Boolean
This language is not supported or no code example is available.
internal protected bool UpdateProgressAndCheckCancelled( 
int current
int total
string text
BackgroundWorker worker
DoWorkEventArgs doWorkEventArgs
bool forceUpdate = false, 
params string[] args 
)
This language is not supported or no code example is available.

Parameters

current
int

The current step

total
int

The total number of steps

text
string

The progress bar text

worker
BackgroundWorker

The background worker thread

doWorkEventArgs
DoWorkEventArgs

DoWork event arguments

forceUpdate
bool

When true the event is always fired. Must be used with caution!

args
string[]

A string array that contains zero or more strings to format for the progress bar text

Return Value

bool

False if the worker thread was canceled, true otherwise.

.NET Framework

Supported in: 4.8

In this article

Definition