本文整理汇总了C#中OTFontFileVal.Validator.OnTableProgress方法的典型用法代码示例。如果您正苦于以下问题:C# Validator.OnTableProgress方法的具体用法?C# Validator.OnTableProgress怎么用?C# Validator.OnTableProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OTFontFileVal.Validator
的用法示例。
在下文中一共展示了Validator.OnTableProgress方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Validate
public bool Validate(Validator validator, OTFontVal fontOwner)
{
bool bRet = true;
if (!validator.PerformTest(T.glyf_ValidateAll))
{
return true;
}
this.m_diaValidate=validator.DIA;
this.m_cnts=new int[this.m_namesInfoCnt.Length];
for (int iCnt=0; iCnt<this.m_cnts.Length; iCnt++)
{
this.m_cnts[iCnt]=0;
}
I_IOGlyphsFile i_IOGlyphs=new I_IOGlyphsFile();
if (!i_IOGlyphs.Initialize(fontOwner,validator))
{
return false; // the error is already reported
}
DIAction diaFilter=
DIActionBuilder.DIA(this,"DIAFunc_Filter");
FManager fm=new FManager(i_IOGlyphs, null, null);
int numGlyph=fm.FNumGlyph;
int indGlyph;
for (indGlyph=0; indGlyph<numGlyph; indGlyph++)
{
try
{
validator.OnTableProgress("Validating glyph with index "+indGlyph+" (out of "+numGlyph+" glyphs)");
Glyph glyph=fm.GGet(indGlyph);
glyph.GValidate();
bRet &= fm.GErrGetInformed(indGlyph,diaFilter);
fm.ClearManagementStructs();
}
catch
{
validator.Error(T.T_NULL, E.glyf_E_ExceptionUnhandeled, (OTTag)"glyf",
"Glyph index "+indGlyph);
}
if (validator.CancelFlag)
break;
}
i_IOGlyphs.Clear();
fm.ClearDestroy();
fm=null;
/*
I_ProgressUpdater i_ProgressUpdater=new ValidationCancel(validator);
FManager fm=new FManager(i_IOGlyphs, null, null);
DIAction diaFilter=
DIActionBuilder.DIA(this,"DIAFunc_Filter");
fm.GErrActionAdd(diaFilter,
FManager.TypeActionOnErr.onAdd);
fm.FValidate(GConsts.IND_UNINITIALIZED,
GConsts.IND_UNINITIALIZED);
i_IOGlyphs.Clear();
i_ProgressUpdater.Clear();
fm.ClearDestroy();
fm=null;
*/
for (int iCnt=0; iCnt<this.m_cnts.Length; iCnt++)
{
if (this.m_cnts[iCnt]>0)
{
bool isGErr=this.m_namesInfoCnt[iCnt].StartsWith("GERR_");
string nameFileErr=isGErr? GErrConsts.FILE_RES_GERR_STRINGS: GErrConsts.FILE_RES_OTFFERR_STRINGS;
string nameAsmFileErr=isGErr? GErrConsts.ASM_RES_GERR_STRINGS: GErrConsts.ASM_RES_OTFFERR_STRINGS;
string strDetails="Number of glyphs with the warning = "+this.m_cnts[iCnt];
if (validator.CancelFlag)
strDetails+=" (Validation cancelled)";
ValInfoBasic info=new ValInfoBasic(
ValInfoBasic.ValInfoType.Warning,
this.m_namesInfoCnt[iCnt],
strDetails,
nameFileErr,
nameAsmFileErr,
"glyf",
null);
validator.DIA(info);
}
}
this.m_cnts=null;
return bRet;
}