Repository class

Namespace: TECIT.TFORMer

Opens or creates a Repository, opens a stand-alone FormLayout.

Usage and notes

Overview

A Repository is represented by a master file (extension *.tfr) and a subfolder structure on the file system. It references an arbitrary number of user-defined Project objects. These user-defined Projects are used to divide a Repository into logical areas. Each Project is a container which holds DataField definitions, DataSource definitions and references an arbitrary number of FormLayout objects.

The so-called GlobalProject is allocated by default and is used to define DataFields and DataSources which are available for all FormLayouts regardless of their actual Project membership.

Note

In contrast to a stand-alone FormLayout, the GlobalProject of a Repository can not store references to a FormLayout.

Examples

To open a stand-alone FormLayout do the following:

  // Create a new Repository instance using a stand-alone FormLayout (extension *.tff)
  // Examples are usually installed in
  // - Windows Vista or later: C:/Program Data/TEC-IT/TFORMer/9/Examples
  // - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples
  Repository repository = new Repository(@"C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples/Command Line/ODBCReportPDF/ODBCReportPDF.tff", false, true);

To open a Repository do the following:

  // Create a new Repository instance using a Repository (extension *.tfr)
  // Examples are usually installed in
  // - Windows Vista: C:/Program Data/TEC-IT/TFORMer/9/Examples
  // - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples
  Repository repository = new Repository(@"C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples/Demo Repository/Demos.tfr", false, true);  

Note

This class writes only changes to Repository-files (extension *.tfr) to disk. A stand-alone FormLayout cannot be created, saved or permanently modified on disk via this class.

Note

Thread-safety: A single instance of this class must not be used by different threads.

Base types: IDisposable

Constructors

MemberDescription
Repository(string, bool, bool)

Constructor for Repository objects.

Properties

MemberDescription
AutoSavebool { get; set; }

Gets/Sets a flag indicating whether to save changes to the Repository automatically.

BuildNumberint { get; }

Gets the build number of the Repository.

Commentstring { get; set; }

Gets/Sets the comment for the Repository.

DefaultDataSourceDataSource { get; }

Gets the default DataSource.

DefaultJobTrayControlJobTrayControl { get; }

Gets the default JobTrayControl in the Repository.

DefaultPrinterPrinter { get; }

Gets the Default Printer of the Repository.

Descriptionstring { get; set; }

Gets/Sets the description of the Repository.

DirectoryConnectorListDirectoryConnectorList { get; }

Gets the DirectoryConnectorList stored in the Repository.

FirstJobTrayControlJobTrayControl { get; }

Gets the first JobTrayControl in the Repository.

FirstPrinterPrinter { get; }

Gets the first Printer stored in the Repository.

FirstProjectProject { get; }

Gets the first Project stored in the Repository.

FtpConnectorListFtpConnectorList { get; }

Gets the FtpConnectorList stored in the Repository.

FullPathstring { get; }

Gets the full pathname of the Repository.

GlobalProjectProject { get; }

Gets the global Project of the Repository.

IsModifiedbool { get; set; }

Gets/Sets a flag indicating whether this Repository has been modified.

IsReadOnlybool { get; }

Gets a flag indicating whether this Repository is read-only.

NumberOfJobTrayControlsint { get; }

Gets the number of JobTrayControl-objects stored in the Repository.

NumberOfPrintersint { get; }

Gets the number of printers defined in the Repository.

NumberOfProjectsint { get; }

Gets the number of Project-objects stored in the Repository.

OdbcConnectorListOdbcConnectorList { get; }

Gets the OdbcConnectorList stored in the Repository.

ServerSettingsServerSettings { get; }

Gets the ServerSettings in the Repository.

TCPConnectorTCPConnector { get; }

Gets the TCPConnector stored in the Repository.

UserListenerUserListener { get; }

Gets the UserListener stored in the Repository.

VersionMajorint { get; }

Gets the major version number of the Repository.

VersionMinorint { get; }

Gets the minor version number of the Repository.

VirtualPrinterVirtualPrinter { get; }

Gets the VirtualPrinter stored in the Repository.

Methods

MemberDescription
AddJobTrayControl(string)Returns: JobTrayControl

Creates and adds a new JobTrayControl to the Repository.

AddPrinter(string)Returns: Printer

Creates and adds the Printer to the Repository.

AddProject(string)Returns: Project

Creates and adds the Project in the Repository.

Close(bool)Returns: void

Close this Repository.

Dispose()Returns: void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetJobTrayControl(string)Returns: JobTrayControl

Gets a JobTrayControl defined in the Repository.

GetPrinter(string)Returns: Printer

Gets the Printer from the Repository.

GetProject(string)Returns: Project

Gets the Project defined in the Repository.

RemoveJobTrayControl(JobTrayControl)Returns: void

Removes the JobTrayControl from the Repository.

RemoveJobTrayControl(string)Returns: void

Removes the JobTrayControl from the Repository.

RemovePrinter(Printer)Returns: void

Removes the Printer from the Repository.

RemovePrinter(string)Returns: void

Removes the Printer from the Repository.

RemoveProject(Project)Returns: void

Removes the Project from the Repository.

RemoveProject(string)Returns: void

Removes the Project from the Repository.

Save()Returns: void

Saves this Repository.

SaveAs(string)Returns: void

Saves a copy of this Repository.

ToString()override · Returns: string

Returns a string representation of the instance.

Search documentation

Search in
More scopes
Additional scopes

All contents