Méthode | Description | |
---|---|---|
ShowDialog ( IBackgroundTask p_bgtTask ) : DialogResult |
Shows the progress dialog as a modal window.
|
|
ShowDialog ( IWin32Window p_winOwner, IBackgroundTask p_bgtTask ) : DialogResult |
Shows the progress dialog as a modal window that is a child of the given owner.
|
Méthode | Description | |
---|---|---|
OnClosing ( CancelEventArgs e ) : void |
Raises the Form.Closing event. This prevents the form from closing until the task has completed. |
|
OnShown ( |
Raises the Form.Shown event. This immediately closes the form if the task has already completed. |
|
ProgressDialog ( IBackgroundTask p_bgtTask ) : System |
A simple constructor that initializes the object with the given values.
|
Méthode | Description | |
---|---|---|
DoDispose ( ) : void |
Allows extension of the dispose method. This unwires listeners that are wired to object on other threads. This is because if the form is closed before the threads are finished the threads may raise events to which we are listening, which will cause access to the control after it has been disposed (which will raise an exception). |
|
HandleChangedProperty ( string p_strPropertyName ) : void |
Updates the form to display the changed property.
|
|
Task_PropertyChanged ( object sender, |
Handles the INotifyPropertyChanged.PropertyChanged event of the task. This updates the progress bars and messages. |
|
Task_TaskEnded ( object sender, TaskEndedEventArgs e ) : void |
Handles the IBackgroundTask.TaskEnded event of the task. This sets the Form.DialogResult, dependant upon whether or not the task was cancelled. |
|
butCancel_Click ( object sender, |
Handles the Control.Click event of the cancel button. This asks the BackgroundWorker to cancel. It also disables the cancel button to let the user know the process is cancelling. |
protected OnClosing ( CancelEventArgs e ) : void | ||
e | CancelEventArgs | A |
Résultat | void |
protected OnShown ( |
||
e | An |
|
Résultat | void |
protected ProgressDialog ( IBackgroundTask p_bgtTask ) : System | ||
p_bgtTask | IBackgroundTask | The |
Résultat | System |
public static ShowDialog ( IBackgroundTask p_bgtTask ) : DialogResult | ||
p_bgtTask | IBackgroundTask | The |
Résultat | DialogResult |
public static ShowDialog ( IWin32Window p_winOwner, IBackgroundTask p_bgtTask ) : DialogResult | ||
p_winOwner | IWin32Window | The owner of the dialog. |
p_bgtTask | IBackgroundTask | The |
Résultat | DialogResult |