常见问题:TFORMer SDK
获取版式中使用的数据字段 (TFORMer .NET API)
获取版式中使用的数据字段 (TFORMer .NET API)
存储库中的数据字段
Repository repository = new Repository ("C:\\Path\\Labels.tfr", false, false);
Project project = repository.GetProject("BarcodeLabels");
FormLayout formlayout = project.GetFormLayout("Label1");
// iterate through all DataFields in the project
for (DataField field = project.FirstDataField; field != null; field = field.Next)
{
// check if the DataField is used in the FormLayout
DataFieldUsage usage = formlayout.GetDataFieldUsage(field.Name);
if (usage == DataFieldUsage.Normal)
{
// DataField used in the FormLayout
}
}
TFF 中的数据字段
// create a Repository-instance using a stand-alone FormLayout
Repository repo = new Repository("C:\\Path\\Label.tff", false, false);
// retrieves the global project
Project project = repo.GlobalProject;
// retrieves the one and only FormLayout (stand-alone form)
FormLayout formlayout = project.FirstFormLayout;
// retrieving the data fields:
// use the same code as with the repository (see above)