HelperFunctionsProgressBarInitializeProgressBar Method (ActionObject, DoWorkEventArgs, ActionObject, ProgressChangedEventArgs, ActionObject, RunWorkerCompletedEventArgs) |
This method will initialize the BackGround Worker for the Progress Bar.
Calling this method is mandatory.
Namespace:
AHL
Assembly:
AHL (in AHL.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static void InitializeProgressBar(
Action<Object, DoWorkEventArgs> DoWork,
Action<Object, ProgressChangedEventArgs> ProgressChanged,
Action<Object, RunWorkerCompletedEventArgs> RunWorkerCompleted
)
Public Shared Sub InitializeProgressBar (
DoWork As Action(Of Object, DoWorkEventArgs),
ProgressChanged As Action(Of Object, ProgressChangedEventArgs),
RunWorkerCompleted As Action(Of Object, RunWorkerCompletedEventArgs)
)
public:
static void InitializeProgressBar(
Action<Object^, DoWorkEventArgs^>^ DoWork,
Action<Object^, ProgressChangedEventArgs^>^ ProgressChanged,
Action<Object^, RunWorkerCompletedEventArgs^>^ RunWorkerCompleted
)
static member InitializeProgressBar :
DoWork : Action<Object, DoWorkEventArgs> *
ProgressChanged : Action<Object, ProgressChangedEventArgs> *
RunWorkerCompleted : Action<Object, RunWorkerCompletedEventArgs> -> unit
Parameters
- DoWork
- Type: SystemActionObject, DoWorkEventArgs
This is the delegate function what will handle the actual task for the Progress Bar. It must include a ProgressBar.GetWorker().ReportProgress(int i) value inside the actual task. - ProgressChanged
- Type: SystemActionObject, ProgressChangedEventArgs
This is delegate function what will handle the progress bar update. It should include something similar to progressBar1.Value = e.ProgressPercentage; - RunWorkerCompleted
- Type: SystemActionObject, RunWorkerCompletedEventArgs
This is delegate function what will handle the events for the completion (error, cancel, succed) of the task.
See Also