beautypg.com

Workspaces – Kofax DOKuStar Validation User Manual

Page 87

background image

DOKuStar Validation Programming Manual

Page

83

Workspaces

In the previous section we used the

Workspace

service of Validation. In this section it is explained what a

workspace is and how it is used.

The workspace of Validation comprises the size and location of the various elements of the user interface of
Validation within the main window. For example, if you drag custom user control of our example from the bottom of
the main window to the top, you are changing the workspace of Validation. The same is true, if you change the order
of the toolbars.

Validation normally does not save the current workspace. So if you start Validation the main window will show the
default layout and will not reflect changes made during the previous session. In our example, the custom user control
will appear again at the bottom and not at the top.

To be able to solve this problem it is possible to save the workspace to the registry or to a file.

At first we will save a workspace to a file. The methods

workspaceSink.LoadWorkspace

and

workspaceSink.SaveWorkspace

allow to load a workspace from file or to save it to a file respectively. As a

preparation the

Workspace

service of Validation must be provided. In our example we did this already in the

previous section. There it was saved to the variable

workspaceSink

. We load the workspace in a function

loadDefault()

that shall be called when Validation is already initialized (i.e. in the function

dsValApp_OnFinalInitialized

) and we save it in a function

storeDefault()

that shall be called before

Validation is closed (function

dsValApp_OnClosed

):

After entering the code, generate

ValiTour.dll

and start

dsval.exe

. The Validation window will now look

like this: