UpdateControllerShowDownloadUpdateDialog Method (ErrorDisplayLevel) |
Namespace: Kjs.AppLife.Update.Controller
Exception | Condition |
---|---|
InvalidEnumArgumentException | errorDisplayLevel is not a valid ErrorDisplayLevel value. |
InvalidOperationException | IsBusy is . -or- CurrentUpdate is . |
ObjectDisposedException | The UpdateController has been disposed. |
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.