Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.3
|
Leadtools.Documents.UI Namespace > DocumentViewerCommand Class : PreRun Method |
public bool PreRun( DocumentViewer documentViewer, object value )
'Declaration
Public Function PreRun( _ ByVal documentViewer As DocumentViewer, _ ByVal value As Object _ ) As Boolean
'Usage
Dim instance As DocumentViewerCommand Dim documentViewer As DocumentViewer Dim value As Object Dim value As Boolean value = instance.PreRun(documentViewer, value)
public: bool PreRun( DocumentViewer^ documentViewer, Object^ value )
This method informs the document viewer that this command is about to run by creating a new DocumentViewerOperationEventArgs object with DocumentViewerOperation.RunCommand and the command object in Data1, value in Data2 and IsPostOperation set to false then firing the Operation event.
This informs anyone listening to the event the command is about to run which can be important if the command is slow. For example, to create a wait dialog in the user interface in this case.
The listener can also abort the execution of this command by setting the value of Abort to true. Which will result in this method returning false to the document viewer and the running of this command is canceled.