TFORMer SDK - NET  7.5
Public Member Functions | Properties | List of all members
Project Class Reference

Provides access to Project information of a Repository or a stand-alone link FormLayout. More...

Public Member Functions

DataField AddDataField (string name)
 Creates and adds a DataField to the Project. More...
 
DataSource AddDataSource (DataSourceType type, string name)
 Creates and adds a DataSource to the Project. More...
 
FormLayout AddFormLayout (string name)
 Creates and adds a FormLayout to the Project. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
DataField GetDataField (string name)
 Gets the DataField information from the Project. More...
 
DataSource GetDataSource (string name)
 Gets the DataSource information from the Project. More...
 
FormLayout GetFormLayout (string name)
 Gets the FormLayout information from the Project. More...
 
void RemoveDataField (DataField field)
 Removes a DataField from the Project. More...
 
void RemoveDataField (string name)
 Removes a DataField from the Project. More...
 
void RemoveDataSource (DataSource dataSource)
 Removes the DataSource from the Project. More...
 
void RemoveDataSource (string name)
 Removes the DataSource from the Project. More...
 
void RemoveFormLayout (FormLayout form)
 Removes a FormLayout from the Project. More...
 
void RemoveFormLayout (string name)
 Removes a FormLayout from the Project. More...
 
override string ToString ()
 Returns a string representation of the instance. More...
 

Properties

string Comment [get, set]
 Gets/Sets the comment for the Project. More...
 
string DefaultDirectory [get]
 Gets the default directory of the Project. More...
 
string Description [get, set]
 Gets/Sets the description of the Project. More...
 
DataField FirstDataField [get]
 Gets the first DataField of the Project. More...
 
DataSource FirstDataSource [get]
 Gets the first DataSource defined in the Project. More...
 
FormLayout FirstFormLayout [get]
 Gets the first FormLayout of the Project. More...
 
string Name [get, set]
 Gets/Sets the name of the Project. More...
 
Project Next [get]
 Gets the next Project defined in the Repository. More...
 
int NumberOfDataFields [get]
 Gets the number of DataFields defined in the Project. More...
 
int NumberOfDataSources [get]
 Gets the number of DataSources defined in the Project. More...
 
int NumberOfFormLayouts [get]
 Gets the number of FormLayouts defined in this Project. More...
 

Detailed Description

Provides access to Project information of a Repository or a stand-alone link FormLayout.

This class is used to retrieve or set information belonging to a user-defined Project or to the GlobalProject.

Overview

A Project is a logical container for related FormLayout, DataSource and DataField definitions. It divides a Repository into logical units.

Exactly one GlobalProject is available for both a Repository or a stand-alone FormLayout. In the case of a Repository additional Project objects can be created by the user.

In order to access the DataFields in a Project you may either use the method Project.GetDataField or you may iterate through all available DataFields using Project.FirstDataField and DataField.Next. If you want to know, whether the returned DataField is actually used in a FormLayout you can use the method FormLayout.GetDataFieldUsage.

Example

To retrieve all Project objects within a Repository do the following:

// Retrieve the first Project
Project project = repository.FirstProject;
while (project != null)
{
Console.Write(project.ToString());
// Get the next Project
project = project.Next;
}
Attention
The Project is only valid as long as it is available in the Repository. If it is removed from the Repository all instances of the Project immediately become invalid.

More Information

GlobalProject

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

Member Function Documentation

DataField AddDataField ( string  name)

Creates and adds a DataField to the Project.

Parameters
nameThe name of the DataField to be added to the Project
Returns
DataField object
See also
DataField
DataSource AddDataSource ( DataSourceType  type,
string  name 
)

Creates and adds a DataSource to the Project.

Returns
DataSource object
Parameters
typeThe type of the DataSource
nameThe name of the DataSource to be added to the Project
See also
DataSource
FormLayout AddFormLayout ( string  name)

Creates and adds a FormLayout to the Project.

Returns
FormLayout object
Parameters
nameThe name of the FormLayout to be added to the Project
See also
FormLayout
void Dispose ( )

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

DataField GetDataField ( string  name)

Gets the DataField information from the Project.

Parameters
nameThe name of the DataField to be retrieved from the Project
Returns
A valid object instance or null
See also
DataField
DataSource GetDataSource ( string  name)

Gets the DataSource information from the Project.

Parameters
nameThe name of the DataSource to be retrieved from the Project
Returns
A valid object instance or null
See also
DataSource
FormLayout GetFormLayout ( string  name)

Gets the FormLayout information from the Project.

Parameters
nameThe name of the FormLayout to be retrieved from the Project
Returns
A valid object instance or null
See also
FormLayout
void RemoveDataField ( DataField  field)

Removes a DataField from the Project.

Parameters
fieldDataField to be removed
See also
DataField
void RemoveDataField ( string  name)

Removes a DataField from the Project.

Parameters
nameName of the DataField
See also
DataField
void RemoveDataSource ( DataSource  dataSource)

Removes the DataSource from the Project.

Parameters
dataSourceThe DataSource to be removed from the Project
See also
DataSource
void RemoveDataSource ( string  name)

Removes the DataSource from the Project.

Parameters
nameThe name of the DataSource to be removed from the Project
See also
DataSource
void RemoveFormLayout ( FormLayout  form)

Removes a FormLayout from the Project.

Parameters
formFormLayout to be removed
See also
FormLayout
void RemoveFormLayout ( string  name)

Removes a FormLayout from the Project.

Parameters
nameName of the FormLayout to be removed
See also
FormLayout
override string ToString ( )

Returns a string representation of the instance.

Returns
A string representation of the instance

Property Documentation

string Comment
getset

Gets/Sets the comment for the Project.

Returns
The comment for the Project
string DefaultDirectory
get

Gets the default directory of the Project.

Returns
The default directory of the Project
string Description
getset

Gets/Sets the description of the Project.

Returns
The description of the Project
DataField FirstDataField
get

Gets the first DataField of the Project.

Returns
DataField object for the first DataField
See also
DataField
DataSource FirstDataSource
get

Gets the first DataSource defined in the Project.

Returns
The first DataSource defined in the Project.
See also
DataSource
FormLayout FirstFormLayout
get

Gets the first FormLayout of the Project.

Returns
FormLayout object for the first FormLayout, null if no FormLayout exists
See also
FormLayout
string Name
getset

Gets/Sets the name of the Project.

Returns
The name of the Project
Project Next
get

Gets the next Project defined in the Repository.

A Repository stores a list of Project objects. You can use this method to iterate through the list. To retrieve the first Project in the Repository see Repository.FirstProject.

Returns
The next Project object in the list or null.
int NumberOfDataFields
get

Gets the number of DataFields defined in the Project.

Returns
The number of DataFields defined in the Project
See also
DataField
int NumberOfDataSources
get

Gets the number of DataSources defined in the Project.

Returns
The number of DataSources defined in the Project
See also
DataSource
int NumberOfFormLayouts
get

Gets the number of FormLayouts defined in this Project.

Returns
The number of FormLayouts defined in this Project
See also
FormLayout

© 2006-2017 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Fri Nov 3 2017 07:59:04 for TFORMer SDK - NET with doxygen 1.8.9.1