TFORMer SDK - NET 8
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;
}
Provides access to Project information of a Repository or a stand-alone link FormLayout.
Definition: Project.cs:22
Project Next
Gets the next Project defined in the Repository.
Definition: Project.cs:193
override string ToString()
Returns a string representation of the instance.
Definition: Project.cs:648
Project FirstProject
Gets the first Project stored in the Repository.
Definition: Repository.cs:456
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

◆ AddDataField()

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

◆ AddDataSource()

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

◆ AddFormLayout()

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

◆ Dispose()

void Dispose ( )

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

◆ GetDataField()

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

◆ GetDataSource()

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

◆ GetFormLayout()

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

◆ RemoveDataField() [1/2]

void RemoveDataField ( DataField  field)

Removes a DataField from the Project.

Parameters
fieldDataField to be removed
See also
DataField

◆ RemoveDataField() [2/2]

void RemoveDataField ( string  name)

Removes a DataField from the Project.

Parameters
nameName of the DataField
See also
DataField

◆ RemoveDataSource() [1/2]

void RemoveDataSource ( DataSource  dataSource)

Removes the DataSource from the Project.

Parameters
dataSourceThe DataSource to be removed from the Project
See also
DataSource

◆ RemoveDataSource() [2/2]

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

◆ RemoveFormLayout() [1/2]

void RemoveFormLayout ( FormLayout  form)

Removes a FormLayout from the Project.

Parameters
formFormLayout to be removed
See also
FormLayout

◆ RemoveFormLayout() [2/2]

void RemoveFormLayout ( string  name)

Removes a FormLayout from the Project.

Parameters
nameName of the FormLayout to be removed
See also
FormLayout

◆ ToString()

override string ToString ( )

Returns a string representation of the instance.

Returns
A string representation of the instance

Property Documentation

◆ Comment

string Comment
getset

Gets/Sets the comment for the Project.

Returns
The comment for the Project

◆ DefaultDirectory

string DefaultDirectory
get

Gets the default directory of the Project.

Returns
The default directory of the Project

◆ Description

string Description
getset

Gets/Sets the description of the Project.

Returns
The description of the Project

◆ FirstDataField

DataField FirstDataField
get

Gets the first DataField of the Project.

Returns
DataField object for the first DataField
See also
DataField

◆ FirstDataSource

DataSource FirstDataSource
get

Gets the first DataSource defined in the Project.

Returns
The first DataSource defined in the Project.
See also
DataSource

◆ FirstFormLayout

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

◆ Name

string Name
getset

Gets/Sets the name of the Project.

Returns
The name of the Project

◆ Next

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.

◆ NumberOfDataFields

int NumberOfDataFields
get

Gets the number of DataFields defined in the Project.

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

◆ NumberOfDataSources

int NumberOfDataSources
get

Gets the number of DataSources defined in the Project.

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

◆ NumberOfFormLayouts

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-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