C# 클래스 Nexus.Client.BackgroundTasks.UI.ProgressDialog

This is a window that displays the progress of a IBackgroundTask
상속: System.Windows.Forms.Form
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
OnClosing ( CancelEventArgs e ) : void

Raises the Form.Closing event.

This prevents the form from closing until the task has completed.

OnShown ( EventArgs e ) : void

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.

비공개 메소드들

메소드 설명
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, PropertyChangedEventArgs e ) : void

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, EventArgs e ) : void

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.

메소드 상세

OnClosing() 보호된 메소드

Raises the Form.Closing event.
This prevents the form from closing until the task has completed.
protected OnClosing ( CancelEventArgs e ) : void
e CancelEventArgs A describing the event arguments.
리턴 void

OnShown() 보호된 메소드

Raises the Form.Shown event.
This immediately closes the form if the task has already completed.
protected OnShown ( EventArgs e ) : void
e System.EventArgs An describing the event arguments.
리턴 void

ProgressDialog() 보호된 메소드

A simple constructor that initializes the object with the given values.
protected ProgressDialog ( IBackgroundTask p_bgtTask ) : System
p_bgtTask IBackgroundTask The whose progress is to be displayed.
리턴 System

ShowDialog() 공개 정적인 메소드

Shows the progress dialog as a modal window.
public static ShowDialog ( IBackgroundTask p_bgtTask ) : DialogResult
p_bgtTask IBackgroundTask The whose progress is to be displayed.
리턴 DialogResult

ShowDialog() 공개 정적인 메소드

Shows the progress dialog as a modal window that is a child of the given owner.
public static ShowDialog ( IWin32Window p_winOwner, IBackgroundTask p_bgtTask ) : DialogResult
p_winOwner IWin32Window The owner of the dialog.
p_bgtTask IBackgroundTask The whose progress is to be displayed.
리턴 DialogResult