Click or drag to resize
UpdateControllerShowDownloadUpdateDialog Method (IWin32Window, ErrorDisplayLevel)
Downloads the update represented by CurrentUpdate while showing a modal dialog to the user that can show the specified amount of error information in front of the specified object.

Namespace: Kjs.AppLife.Update.Controller
Assembly: Kjs.AppLife.Update.Controller (in Kjs.AppLife.Update.Controller.dll) Version: 5.1.0.9 (5.1.0.9)
Syntax
public DialogResult ShowDownloadUpdateDialog(
	IWin32Window owner,
	ErrorDisplayLevel errorDisplayLevel
)

Parameters

owner
Type: System.Windows.FormsIWin32Window
An implementation of IWin32Window that will own the modal dialog.
errorDisplayLevel
Type: Kjs.AppLife.Update.ControllerErrorDisplayLevel
One of the ErrorDisplayLevel values indicating how much error detail can be shown to the user.

Return Value

Type: DialogResult
DialogResult.OK if the update was successfuly downloaded; otherwise, DialogResult.Cancel.
Exceptions
ExceptionCondition
InvalidEnumArgumentExceptionerrorDisplayLevel is not a valid ErrorDisplayLevel value.
InvalidOperationException

IsBusy is .

-or-

CurrentUpdate is .

ObjectDisposedException

The UpdateController has been disposed.

Remarks

This method downloads the update represented by CurrentUpdate. To find an update to download, use CheckForUpdate, CheckForUpdateAsync, or ShowCheckForUpdateDialog. This method blocks while the dialog is displayed. To download an update and continue executing while waiting for the download to complete, use DownloadUpdateAsync. To download the update without showing a dialog, use DownloadUpdate.

If the update is successfully downloaded, the dialog will close automatically and this method will return DialogResult.OK. The update is not automatically applies; you must call ApplyUpdate to apply the update.

If an exception is thrown while downloading the update, the dialog will display a simple error message to the user. If errorDisplayLevel is ShowExceptionMessage, the user can click a button to view the message of the exception and any inner exceptions by clicking a "Show details" button.

If an error occurs or the user cancels the download, this method returns DialogResult.Cancel.

See Also