TFORMer SDK - NET 8
Public Member Functions | Properties | List of all members
Repository Class Reference

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

Public Member Functions

 Repository (string filename, bool createNewRepository, bool isReadOnly)
 Constructor for Repository objects. More...
 
JobTrayControl AddJobTrayControl (string name)
 Creates and adds a new JobTrayControl to the Repository. More...
 
Printer AddPrinter (string name)
 Creates and adds the Printer to the Repository. More...
 
Project AddProject (string name)
 Creates and adds the Project in the Repository. More...
 
void Close (bool commitChanges)
 Close this Repository. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
JobTrayControl GetJobTrayControl (string name)
 Gets a JobTrayControl defined in the Repository. More...
 
Printer GetPrinter (string name)
 Gets the Printer from the Repository. More...
 
Project GetProject (string name)
 Gets the Project defined in the Repository. More...
 
void RemoveJobTrayControl (JobTrayControl jobTrayControl)
 Removes the JobTrayControl from the Repository. More...
 
void RemoveJobTrayControl (string name)
 Removes the JobTrayControl from the Repository. More...
 
void RemovePrinter (Printer printer)
 Removes the Printer from the Repository. More...
 
void RemovePrinter (string name)
 Removes the Printer from the Repository. More...
 
void RemoveProject (Project project)
 Removes the Project from the Repository. More...
 
void RemoveProject (string name)
 Removes the Project from the Repository. More...
 
void Save ()
 Saves this Repository. More...
 
void SaveAs (string filename)
 Saves a copy of this Repository. More...
 
override string ToString ()
 Returns a string representation of the instance. More...
 

Properties

bool AutoSave [get, set]
 Gets/Sets a flag indicating whether to save changes to the Repository automatically. More...
 
int BuildNumber [get]
 Gets the build number of the Repository. More...
 
string Comment [get, set]
 Gets/Sets the comment for the Repository. More...
 
DataSource DefaultDataSource [get]
 Gets the default DataSource. More...
 
JobTrayControl DefaultJobTrayControl [get]
 Gets the default JobTrayControl in the Repository. More...
 
Printer DefaultPrinter [get]
 Gets the Default Printer of the Repository. More...
 
string Description [get, set]
 Gets/Sets the description of the Repository. More...
 
DirectoryConnectorList DirectoryConnectorList [get]
 Gets the DirectoryConnectorList stored in the Repository. More...
 
JobTrayControl FirstJobTrayControl [get]
 Gets the first JobTrayControl in the Repository. More...
 
Printer FirstPrinter [get]
 Gets the first Printer stored in the Repository. More...
 
Project FirstProject [get]
 Gets the first Project stored in the Repository. More...
 
FtpConnectorList FtpConnectorList [get]
 Gets the FtpConnectorList stored in the Repository. More...
 
string FullPath [get]
 Gets the full pathname of the Repository. More...
 
Project GlobalProject [get]
 Gets the global Project of the Repository. More...
 
bool IsModified [get, set]
 Gets/Sets a flag indicating whether this Repository has been modified. More...
 
bool IsReadOnly [get]
 Gets a flag indicating whether this Repository is read-only. More...
 
int NumberOfJobTrayControls [get]
 Gets the number of JobTrayControl-objects stored in the Repository. More...
 
int NumberOfPrinters [get]
 Gets the number of printers defined in the Repository. More...
 
int NumberOfProjects [get]
 Gets the number of Project-objects stored in the Repository. More...
 
OdbcConnectorList OdbcConnectorList [get]
 Gets the OdbcConnectorList stored in the Repository. More...
 
ServerSettings ServerSettings [get]
 Gets the ServerSettings in the Repository. More...
 
TCPConnector TCPConnector [get]
 Gets the TCPConnector stored in the Repository. More...
 
UserListener UserListener [get]
 Gets the UserListener stored in the Repository. More...
 
int VersionMajor [get]
 Gets the major version number of the Repository. More...
 
int VersionMinor [get]
 Gets the minor version number of the Repository. More...
 
VirtualPrinter VirtualPrinter [get]
 Gets the VirtualPrinter stored in the Repository. More...
 

Detailed Description

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

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 exclusively used to define DataFields 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/8/Examples
// - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/8/Examples
Repository repository = new Repository(@"C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/8/Examples/Command Line/ODBCReportPDF/ODBCReportPDF.tff", false, true);
Opens or creates a Repository, opens a stand-alone FormLayout.
Definition: Repository.cs:24
Repository(string filename, bool createNewRepository, bool isReadOnly)
Constructor for Repository objects.
Definition: Repository.cs:54

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/8/Examples
// - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/8/Examples
Repository repository = new Repository(@"C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/8/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.
Thread-safety: A single instance of this class must not be used by different threads.

Constructor & Destructor Documentation

◆ Repository()

Repository ( string  filename,
bool  createNewRepository,
bool  isReadOnly 
)

Constructor for Repository objects.

Calls native allocation methods and either creates a new Repository or opens an existing Repository or a stand-alone FormLayout.

Parameters
filenameThe full path of a new or existing Repository (see also Passing Files)
createNewRepositorytrue if a new Repository should be created, false if an existing Repository should be opened
isReadOnlytrue if Repository should be opened read-only (only when opening an existing Repository)
See also
Passing Files

Member Function Documentation

◆ AddJobTrayControl()

JobTrayControl AddJobTrayControl ( string  name)

Creates and adds a new JobTrayControl to the Repository.

For a stand-alone FormLayout this method is not available

Parameters
nameThe name of the JobTrayControl.
Returns
The JobTrayControl object
See also
JobTrayControl

◆ AddPrinter()

Printer AddPrinter ( string  name)

Creates and adds the Printer to the Repository.

Attention
Internal use only
Parameters
nameThe name the Printer
Returns
The Printer

◆ AddProject()

Project AddProject ( string  name)

Creates and adds the Project in the Repository.

For a stand-alone FormLayout this method is not available. A stand-alone FormLayout contains only a GlobalProject which can't be retrieved by name.

Parameters
nameThe name of the Project
Returns
The Project
See also
Project

◆ Close()

void Close ( bool  commitChanges)

Close this Repository.

Any changes to a stand-alone FormLayout are not written to disk (see Save(), SaveAs() or Repository). Thus you can't create new stand-alone FormLayouts.

Parameters
commitChangesIf you call this method with commitChanges = false, all changes will be lost (even if AutoSave() is enabled)!

◆ Dispose()

void Dispose ( )

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

The Repository will be closed, changes are saved if AutoSave() is set to true.

◆ GetJobTrayControl()

JobTrayControl GetJobTrayControl ( string  name)

Gets a JobTrayControl defined in the Repository.

Parameters
nameThe name of the JobTrayControl.
Returns
A valid object instance or null
See also
JobTrayControl

◆ GetPrinter()

Printer GetPrinter ( string  name)

Gets the Printer from the Repository.

Attention
Internal use only
Parameters
nameThe name of the Printer
Returns
A valid object instance or null

◆ GetProject()

Project GetProject ( string  name)

Gets the Project defined in the Repository.

For a stand-alone FormLayout this method is not available. A stand-alone FormLayout contains only a GlobalProject which can't be retrieved by name.

Parameters
nameThe name of the Project
Returns
A valid object instance or null
See also
Project

◆ RemoveJobTrayControl() [1/2]

void RemoveJobTrayControl ( JobTrayControl  jobTrayControl)

Removes the JobTrayControl from the Repository.

For a stand-alone FormLayout this method is not available

Parameters
jobTrayControlThe JobTrayControl instance.
See also
JobTrayControl

◆ RemoveJobTrayControl() [2/2]

void RemoveJobTrayControl ( string  name)

Removes the JobTrayControl from the Repository.

Parameters
nameThe name of the JobTrayControl.
See also
JobTrayControl

◆ RemovePrinter() [1/2]

void RemovePrinter ( Printer  printer)

Removes the Printer from the Repository.

Attention
Internal use only
Parameters
printerThe Printer

◆ RemovePrinter() [2/2]

void RemovePrinter ( string  name)

Removes the Printer from the Repository.

Attention
Internal use only
Parameters
nameThe name of the Printer

◆ RemoveProject() [1/2]

void RemoveProject ( Project  project)

Removes the Project from the Repository.

For a stand-alone FormLayout this method is not available.

Parameters
projectThe Project
See also
Project

◆ RemoveProject() [2/2]

void RemoveProject ( string  name)

Removes the Project from the Repository.

For a stand-alone FormLayout this method is not available.

Parameters
nameThe name of the Project
See also
Project

◆ Save()

void Save ( )

Saves this Repository.

For a stand-alone FormLayout this property is not available

◆ SaveAs()

void SaveAs ( string  filename)

Saves a copy of this Repository.

For a stand-alone FormLayout this method is not available.

Parameters
filenameThe filename of the Repository

◆ ToString()

override string ToString ( )

Returns a string representation of the instance.

Returns
A string representation of the instance

Property Documentation

◆ AutoSave

bool AutoSave
getset

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

If AutoSave is set to true all changes will be saved even when this instance is disposed without calling Close(). If you call Close() directly with commitChanges = false all changes will be lost!

The state of the AutoSave property is not stored on the hard disk. AutoSave is always true after creating or opening a Repository with read/write access.

Returns
If true changes to the Repository will be saved automatically.

◆ BuildNumber

int BuildNumber
get

Gets the build number of the Repository.

Returns
The build number of the Repository

◆ Comment

string Comment
getset

Gets/Sets the comment for the Repository.

For a stand-alone FormLayout this property is not available

Returns
The comment for the Repository.

◆ DefaultDataSource

DataSource DefaultDataSource
get

Gets the default DataSource.

Returns
The default DataSource.
See also
DataSource

◆ DefaultJobTrayControl

JobTrayControl DefaultJobTrayControl
get

Gets the default JobTrayControl in the Repository.

Returns
The default JobTrayControl in the Repository
See also
JobTrayControl

◆ DefaultPrinter

Printer DefaultPrinter
get

Gets the Default Printer of the Repository.

For a stand-alone FormLayout this property is not available

Returns
The Default Printer of the Repository.
Attention
Internal use only

◆ Description

string Description
getset

Gets/Sets the description of the Repository.

For a stand-alone FormLayout this property is always empty

Returns
The description of the Repository

◆ DirectoryConnectorList

DirectoryConnectorList DirectoryConnectorList
get

Gets the DirectoryConnectorList stored in the Repository.

Returns
The DirectoryConnectorList stored in the Repository.
Attention
Internal use only

◆ FirstJobTrayControl

JobTrayControl FirstJobTrayControl
get

Gets the first JobTrayControl in the Repository.

Returns
The first JobTrayControl in the Repository
See also
JobTrayControl

◆ FirstPrinter

Printer FirstPrinter
get

Gets the first Printer stored in the Repository.

Returns
The first Printer stored in the Repository.
Attention
Internal use only

◆ FirstProject

Project FirstProject
get

Gets the first Project stored in the Repository.

For a stand-alone FormLayout always null is returned. Use GlobalProject instead.

Returns
The first Project stored in the Repository, null if it doesn't exist
See also
Project

◆ FtpConnectorList

FtpConnectorList FtpConnectorList
get

Gets the FtpConnectorList stored in the Repository.

Returns
The FtpConnectorList stored in the Repository.
Attention
Internal use only

◆ FullPath

string FullPath
get

Gets the full pathname of the Repository.

Returns
The full pathname of the Repository

◆ GlobalProject

Project GlobalProject
get

Gets the global Project of the Repository.

Returns
The global Project of the Repository.
See also
Project

◆ IsModified

bool IsModified
getset

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

Attention
Internal use only
Returns
true if this Repository was modified

◆ IsReadOnly

bool IsReadOnly
get

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

Read-only means that the Repository can be changed in memory but changes won't be written to disk.

Returns
true if this instance is read-only.

◆ NumberOfJobTrayControls

int NumberOfJobTrayControls
get

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

Returns
The number of JobTrayControl-objects stored in the Repository.
See also
JobTrayControl

◆ NumberOfPrinters

int NumberOfPrinters
get

Gets the number of printers defined in the Repository.

Returns
The number of printers defined in the Repository.

◆ NumberOfProjects

int NumberOfProjects
get

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

The GlobalProject is not counted, so the number of Project-objects is always 0 for stand-alone FormLayouts.

Returns
Gets the number of Project-objects stored in the Repository.
See also
Project

◆ OdbcConnectorList

OdbcConnectorList OdbcConnectorList
get

Gets the OdbcConnectorList stored in the Repository.

Returns
The OdbcConnectorList stored in the Repository.
Attention
Internal use only

◆ ServerSettings

ServerSettings ServerSettings
get

Gets the ServerSettings in the Repository.

For a stand-alone FormLayout the ServerSettings are not available

Returns
The ServerSettings stored in the Repository
Attention
Internal use only

◆ TCPConnector

TCPConnector TCPConnector
get

Gets the TCPConnector stored in the Repository.

Returns
The TCPConnector stored in the Repository.
Attention
Internal use only

◆ UserListener

UserListener UserListener
get

Gets the UserListener stored in the Repository.

Returns
The UserListener stored in the Repository.
Attention
Internal use only

◆ VersionMajor

int VersionMajor
get

Gets the major version number of the Repository.

Returns
The major version number of the Repository

◆ VersionMinor

int VersionMinor
get

Gets the minor version number of the Repository.

Returns
The minor version number of the Repository

◆ VirtualPrinter

VirtualPrinter VirtualPrinter
get

Gets the VirtualPrinter stored in the Repository.

Returns
The VirtualPrinter stored in the Repository.
Attention
Internal use only

© 2006-2023 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Thu Dec 28 2023 18:45:19 for TFORMer SDK - NET with doxygen 1.9.4