FAQ : TFORMer SDK
Récupérer les champs de données utilisés dans une mise en page (API TFORMer .NET)
Récupérer les champs de données utilisés dans une mise en page (API TFORMer .NET)
Champs de données dans un dépôt (repository)
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
}
}
Champs de données dans un 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)