本文整理汇总了C#中IEngine.CreateDocumentsCollection方法的典型用法代码示例。如果您正苦于以下问题:C# IEngine.CreateDocumentsCollection方法的具体用法?C# IEngine.CreateDocumentsCollection怎么用?C# IEngine.CreateDocumentsCollection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEngine
的用法示例。
在下文中一共展示了IEngine.CreateDocumentsCollection方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Verifying_recognized_documents
// USE CASE: Verifying recognized documents
public static void Verifying_recognized_documents( IEngine engine )
{
trace( "Prepare documents and add them to a collection..." );
IDocumentsCollection documentsToVerify = engine.CreateDocumentsCollection();
documentsToVerify.Add( PrepareNewRecognizedDocument( engine ) );
documentsToVerify.Add( PrepareNewRecognizedDocument( engine ) );
traceBegin( "Run verification..." );
IVerificationSession verificationSession = engine.CreateVerificationSession( documentsToVerify );
try {
trace( "Change verification options if required..." );
IVerificationOptions verificationOptions = verificationSession.Options;
verificationOptions.VerifyExtraSymbols = true;
trace( "Open a set of documents (a work set) and collect objects that need to be verified..." );
IVerificationWorkSet verificationWorkSet = verificationSession.NextWorkSet();
while( verificationWorkSet != null ) {
trace( "For each group of objects show the objects to the verification operator for confirmation..." );
IVerificationGroup verificationGroup = verificationWorkSet.NextGroup();
while( verificationGroup != null ) {
trace( "Verification Group: " + verificationGroup.Description + " (confirm all)" );
for( int i = 0; i < verificationGroup.Count; i++ ) {
IVerificationObject verificationObject = verificationGroup.Item( i );
if( verificationObject.Type == VerificationObjectTypeEnum.VOT_Group ) {
verificationObject.State = VerificationObjectStateEnum.VOS_Confirmed;
} else {
IContextVerificationObject contextVerificationObject = verificationObject.AsContextVerificationObject();
// If field value is modified during verification you should recheck rules for
// the corresponding field
contextVerificationObject.CheckRules();
contextVerificationObject.Field.Value.SetVerified();
}
}
verificationGroup = verificationWorkSet.NextGroup();
}
trace( "Save verification results (all documents in the set)..." );
verificationWorkSet.Commit();
trace( "Open the next set of documents..." );
verificationWorkSet = verificationSession.NextWorkSet();
}
trace( "Close the session..." );
}
finally
{
// Verification consumes considerable system resources (many simultaniously
// open and loaded documents and images). So it is VERY important that
// these resources should be released in timely manner and not left for
// garbage collector to manage.
verificationSession.Close();
}
trace( "Check that the documents do not need verification now..." );
for( int i = 0; i < documentsToVerify.Count; i++ ) {
IDocument document = documentsToVerify.Item( i );
recursiveCheckVerified( engine, document.Sections );
}
traceEnd( "OK" );
traceEnd( "OK" );
}
开发者ID:DominatorCode,项目名称:FlexiCapture-Code-Snippets--C--,代码行数:68,代码来源:Using+FlexiCapture+technology+API.cs