C# Class SIL.FieldWorks.FDO.FDOTests.DummyProgressDlg

Inheritance: IThreadedProgress
Show file Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
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 amount ) : void

Cause the progress indicator to advance by the specified amount.

Method Details

RunTask() public method

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.
return object

RunTask() public method

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.
return object

Step() public method

Cause the progress indicator to advance by the specified amount.
public Step ( int amount ) : void
amount int Amount of progress.
return void