本文整理汇总了C#中OTFontFileVal.Validator.SetOnValidateEvent方法的典型用法代码示例。如果您正苦于以下问题:C# Validator.SetOnValidateEvent方法的具体用法?C# Validator.SetOnValidateEvent怎么用?C# Validator.SetOnValidateEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OTFontFileVal.Validator
的用法示例。
在下文中一共展示了Validator.SetOnValidateEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunValidation
//This version of RunValidation is to be used when the file is already opened by other process and you have the handle
//i.e. , this is used when the validation is called from the ValInterface.dll
//The file name is needed just for the path of the report file
public int RunValidation(Validator v, string fpath,SafeFileHandle hFile)
{
int ret = 0;
v.SetOnValidateEvent(new
Validator.OnValidateEvent(OnValidateEvent));
// enable us to receive validation info messages
DIAction vid = new DIAction(ValidatorCallback);
v.SetValInfoDelegate(vid);
try
{
// check to see if the user canceled validation
if (v.CancelFlag)
{
m_callbacks.OnCancel();
return ret;
}
ret |= ValidateFont(v, fpath, hFile, 0, 1);
m_callbacks.OnReportsReady();
}
catch (Exception e)
{
m_callbacks.OnException(e);
return 1;
}
return ret;
}