This generic class provides access to recently used documents.
More...
|
| static T | BrowseDocuments (string documentBrowserCaption, Func< T, bool > selectionMethod=null, bool returnReference=false) |
| | Allows the user to select a document from a document browser showing only specific document windows.
|
| |
| static T | GetLastDocument (int index=0, Func< T, bool > selectionMethod=null, bool returnReference=false) |
| | Returns a document which fulfills the given condition.
|
| |
| static int | GetNumberOfDocuments (Func< T, bool > selectionMethod=null) |
| | Gets the number of documents which fulfill the given condition.
|
| |
This generic class provides access to recently used documents.
- Template Parameters
-
| T | Any type derived from IDocument is supported. |
◆ BrowseDocuments()
| static T BrowseDocuments |
( |
string | documentBrowserCaption, |
|
|
Func< T, bool > | selectionMethod = null, |
|
|
bool | returnReference = false ) |
|
static |
Allows the user to select a document from a document browser showing only specific document windows.
- Parameters
-
| documentBrowserCaption | The caption of the document browser. |
| selectionMethod | Optional method to decide for any given document whether it shall be visible in the document browser (true) or not (false). |
| returnReference | By default a deep copy of the selected document is returned. However, if this optional parameter is set to true only a reference is returned. |
- Returns
- The matching document.
Null if the user closed the document browser.
◆ GetLastDocument()
| static T GetLastDocument |
( |
int | index = 0, |
|
|
Func< T, bool > | selectionMethod = null, |
|
|
bool | returnReference = false ) |
|
static |
Returns a document which fulfills the given condition.
- Parameters
-
| index | By default the most recently selected document matching the selection method is returned. But if you want e.g. the most recent but one you can set the index to 1 and so on. |
| selectionMethod | Optional method to decide for any given document whether it shall be chosen (true) or not (false). |
| returnReference | By default a deep copy of the selected document is returned. However, if this optional parameter is set to true only a reference is returned. |
- Returns
- The matching document.
◆ GetNumberOfDocuments()
| static int GetNumberOfDocuments |
( |
Func< T, bool > | selectionMethod = null | ) |
|
|
static |
Gets the number of documents which fulfill the given condition.
- Parameters
-
| selectionMethod | Optional additional constraints that the documents must fulfill. |
- Returns
- The number of documents which fulfill the condition.