DotNetBrowser  1.14
Public Member Functions | List of all members
DotNetBrowser.DialogHandler Interface Reference

Allows handling browser dialogs such as JavaScript alert, confirmation and prompt. More...

Inherited by DotNetBrowser.WinForms.WinFormsDefaultDialogHandler, and DotNetBrowser.WPF.WPFDefaultDialogHandler.

Public Member Functions

void OnAlert (DialogParams parameters)
 This method is invoked when JavaScript alert dialog should be displayed. In this method you can display standard modal dialog with the message that you can get from parameters. Please note that it's not necessary to display modal dialog in this method. More...
 
CloseStatus OnConfirmation (DialogParams parameters)
 This method is invoked when JavaScript confirmation dialog should be displayed. In this method you can display standard modal dialog with the message that you can get from parameters. Please note that it's not necessary to display modal dialog in this method. More...
 
CloseStatus OnPrompt (PromptDialogParams parameters)
 This method is invoked when JavaScript prompt dialog should be displayed. In this method you can display standard modal dialog with the message and with text field with default prompt text that you can get from parameters. Please note that it's not necessary to display modal dialog in this method. More...
 
CloseStatus OnFileChooser (FileChooserParams parameters)
 This method is invoked when file selection is to be done. You can use this method to display a file chooser dialog with the required type that you can find out from the FileChooserMode. More...
 
CloseStatus OnBeforeUnload (UnloadDialogParams parameters)
 This method is invoked before web page unload. Some web page may override the window.onbeforeunload JavaScript function, so that a confirmation dialog will be shown every time when user try to reload web page or navigate to another web page. You can use this method to display an appropriate confirmation message dialog to ask user whether he or she really wants to leave or reload the web page. More...
 
CloseStatus OnSelectCertificate (CertificatesDialogParams parameters)
 This method is invoked when web server requires authorization via SSL client certificate, to access the list of the certificates from the system storage that match the server criteria. More...
 
CloseStatus OnReloadPostData (ReloadPostDataParams parameters)
 This method is invoked when attempt to reload a web page that has POST data and the user must confirm whether POST data must be sent again or reload must be canceled. More...
 
CloseStatus OnColorChooser (ColorChooserParams parameters)
 This method is invoked when color selection is to be done, when user selects HTML5 input element with color type. You can use this method to display a color chooser dialog. More...
 

Detailed Description

Allows handling browser dialogs such as JavaScript alert, confirmation and prompt.

Member Function Documentation

void DotNetBrowser.DialogHandler.OnAlert ( DialogParams  parameters)

This method is invoked when JavaScript alert dialog should be displayed. In this method you can display standard modal dialog with the message that you can get from parameters. Please note that it's not necessary to display modal dialog in this method.

Parameters
parametersThe alert dialog parameters.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.

CloseStatus DotNetBrowser.DialogHandler.OnBeforeUnload ( UnloadDialogParams  parameters)

This method is invoked before web page unload. Some web page may override the window.onbeforeunload JavaScript function, so that a confirmation dialog will be shown every time when user try to reload web page or navigate to another web page. You can use this method to display an appropriate confirmation message dialog to ask user whether he or she really wants to leave or reload the web page.

Parameters
parametersThe unload dialog parameters such as dialog message and reload flag.
Returns
The CloseStatus.OK when dialog was closed successfully or CloseStatus.CANCEL when dialog was canceled.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.

CloseStatus DotNetBrowser.DialogHandler.OnColorChooser ( ColorChooserParams  parameters)

This method is invoked when color selection is to be done, when user selects HTML5 input element with color type. You can use this method to display a color chooser dialog.

Parameters
parametersThe color chooser dialog parameters.
Returns
The CloseStatus.OK when dialog was closed successfully or CloseStatus.CANCEL when dialog was canceled.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.

CloseStatus DotNetBrowser.DialogHandler.OnConfirmation ( DialogParams  parameters)

This method is invoked when JavaScript confirmation dialog should be displayed. In this method you can display standard modal dialog with the message that you can get from parameters. Please note that it's not necessary to display modal dialog in this method.

Parameters
parametersThe confirmation dialog parameters.
Returns
The CloseStatus.OK when dialog was closed successfully or CloseStatus.CANCEL when dialog was canceled.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.

CloseStatus DotNetBrowser.DialogHandler.OnFileChooser ( FileChooserParams  parameters)

This method is invoked when file selection is to be done. You can use this method to display a file chooser dialog with the required type that you can find out from the FileChooserMode.

Parameters
parametersThe file chooser dialog parameters such as dialog mode, etc.
Returns
The CloseStatus.OK when dialog was closed successfully or CloseStatus.CANCEL when dialog was canceled.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.

CloseStatus DotNetBrowser.DialogHandler.OnPrompt ( PromptDialogParams  parameters)

This method is invoked when JavaScript prompt dialog should be displayed. In this method you can display standard modal dialog with the message and with text field with default prompt text that you can get from parameters. Please note that it's not necessary to display modal dialog in this method.

Parameters
parametersThe prompt dialog parameters such as dialog message and default prompt text.
Returns
The CloseStatus.OK when dialog was closed successfully or CloseStatus.CANCEL when dialog was canceled.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.

CloseStatus DotNetBrowser.DialogHandler.OnReloadPostData ( ReloadPostDataParams  parameters)

This method is invoked when attempt to reload a web page that has POST data and the user must confirm whether POST data must be sent again or reload must be canceled.

Parameters
parametersThe reload dialog parameters.
Returns
The CloseStatus.OK when dialog was closed successfully or CloseStatus.CANCEL when dialog was canceled.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.

CloseStatus DotNetBrowser.DialogHandler.OnSelectCertificate ( CertificatesDialogParams  parameters)

This method is invoked when web server requires authorization via SSL client certificate, to access the list of the certificates from the system storage that match the server criteria.

Parameters
parametersUse it to get information about SSL authorization request, get a list of available certificates and select the required one.
Returns
The CloseStatus.OK when dialog was closed successfully or CloseStatus.CANCEL when dialog was canceled.

Implemented in DotNetBrowser.WPF.WPFDefaultDialogHandler, and DotNetBrowser.WinForms.WinFormsDefaultDialogHandler.