FAQ: TFORMer SDK
Recupero dei campi dati usati in un layout (API TFORMer .NET)
Recupero dei campi dati usati in un layout (API TFORMer .NET)
Campi dati in un 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
}
}
Campi dati in 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)