Owner's manual

DOKuStar Validation for Ascent Capture Page • 68
The
New command has been replaced and shows a submenu with two entries. Following the Export Data
command the new command
Import Extraction Result… appears. The only thing you have to do now is
implementing what should happen if the new menus are used.
For this purpose the
Workspace service has two functions: workspaceSink_OnCommand and
workspaceSink_OnCommandUpdate.
Let us first look at
workspaceSink_OnCommandUpdate. In our example we replace the existing New
command with our own one. There is also a
New button in the toolbar. It is not possible to replace such a button
from existing toolbars, so we have to disable the menu command
New and with this the corresponding toolbar
button is also disabled. With
EventArgs.Enable = True a menu entry is enabled, with EventArgs.Enable
= False
it is disabled. We must also tell Validation that we have handled the menu command New by ourselves.
This is done by the statement
EventArgs.Handled = True. In addition we have to specify texts for tool tips
and the status bar by setting the variables
ToolTiptext and the StatusText for our new menu entries.