C# 클래스 SIL.FieldWorks.Common.Controls.ProgressDialogWithTask

A progress dialog (with an optional cancel button) that displays while a task runs in the background.
상속: IAdvInd3, IAdvInd4, IFWDisposable
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

공개 메소드들

메소드 설명
CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

This method is thread safe.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ImportTranslatedListsForWs ( Form parentWindow, FdoCache cache, string ws ) : void

I'd like to put all this logic into XmlTranslatedLists, because it is common to most cases of calling ImportTranslatedListsForWs, which is the point of this method. Unfortunately FDO cannot reference the DLL that has ProgressDialogWithTask. I've made it public static so that anything that references FwControls can use it at least.

ProgressDialogWithTask ( Form owner ) : System

Initializes a new instance of the ProgressDialogWithTask class that will create an actual progress dialog box to track the progress.

ProgressDialogWithTask ( ISynchronizeInvoke synchronizeInvoke ) : System

Initializes a new instance of the ProgressDialogWithTask class.

RunTask ( Func backgroundTask ) : object

If progress dialog is already showing, we run the background task using it (without creating a separate thread). Otherwise we display a new progress dialog as a modal dialog and start the background task in a separate thread.

RunTask ( bool fDisplayUi, Func backgroundTask ) : object

Displays the progress dialog as a modal dialog and starts the background task.

Step ( int cSteps ) : void

Steps the specified number of steps.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

m_progressDialog_Canceling ( object sender, System.CancelEventArgs e ) : void

Calls subscribers to the cancel event.

비공개 메소드들

메소드 설명
AddStartListener ( ) : void
DialogShown ( ) : void
DialogShown ( object sender, EventArgs e ) : void
ImportTranslatedListsForWs ( IThreadedProgress dlg, object args ) : object

Method with required signature for ProgressDialogWithTask.RunTask, to invoke XmlTranslatedLists.ImportTranslatedListsForWs. Should only be called by the other overload of ImportTranslatedListsForWs. args must be a writing system identifier string and an FdoCache.

InitOnOwnerThread ( ) : void
LaunchDialogAndTask ( IWin32Window owner ) : void
ProgressDialogWithTask ( Form owner, ISynchronizeInvoke synchronizeInvoke ) : System

Initializes a new instance of the ProgressDialogWithTask class.

RemoveStartListener ( ) : void
RunBackgroundTask ( object sender, DoWorkEventArgs e ) : void

Executes the background task.

This method runs in the background thread!

m_progressDialog_FormClosing ( object sender, FormClosingEventArgs e ) : void
m_worker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void

메소드 상세

CheckDisposed() 공개 메소드

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
This method is thread safe.
public CheckDisposed ( ) : void
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

ImportTranslatedListsForWs() 공개 정적인 메소드

I'd like to put all this logic into XmlTranslatedLists, because it is common to most cases of calling ImportTranslatedListsForWs, which is the point of this method. Unfortunately FDO cannot reference the DLL that has ProgressDialogWithTask. I've made it public static so that anything that references FwControls can use it at least.
public static ImportTranslatedListsForWs ( Form parentWindow, FdoCache cache, string ws ) : void
parentWindow System.Windows.Forms.Form
cache FdoCache
ws string
리턴 void

ProgressDialogWithTask() 공개 메소드

Initializes a new instance of the ProgressDialogWithTask class that will create an actual progress dialog box to track the progress.
public ProgressDialogWithTask ( Form owner ) : System
owner System.Windows.Forms.Form The form to use as the owner when creating the actual progress /// dialog.
리턴 System

ProgressDialogWithTask() 공개 메소드

Initializes a new instance of the ProgressDialogWithTask class.
public ProgressDialogWithTask ( ISynchronizeInvoke synchronizeInvoke ) : System
synchronizeInvoke ISynchronizeInvoke
리턴 System

RunTask() 공개 메소드

If progress dialog is already showing, we run the background task using it (without creating a separate thread). Otherwise we display a new progress dialog as a modal dialog and start the background task in a separate thread.
Wraps any exception thrown by the background /// task
public RunTask ( Func backgroundTask ) : object
backgroundTask Func The background task.
리턴 object

RunTask() 공개 메소드

Displays the progress dialog as a modal dialog and starts the background task.
Wraps any exception thrown by the background /// task
public RunTask ( bool fDisplayUi, Func backgroundTask ) : object
fDisplayUi bool set to true to display the progress dialog, /// false to run without UI.
backgroundTask Func The background task.
리턴 object

Step() 공개 메소드

Steps the specified number of steps.
public Step ( int cSteps ) : void
cSteps int The count of steps. If it's 0, step the default step size
리턴 void

m_progressDialog_Canceling() 보호된 메소드

Calls subscribers to the cancel event.
protected m_progressDialog_Canceling ( object sender, System.CancelEventArgs e ) : void
sender object The sender.
e System.CancelEventArgs The instance containing the event data.
리턴 void