TFORMer SDK - NET  8
Public Member Functions | Properties
Project Class Reference

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

List of all members.

Public Member Functions

DataField AddDataField (string name)
 Creates and adds a DataField to the Project.
DataSource AddDataSource (DataSourceType type, string name)
 Creates and adds a DataSource to the Project.
FormLayout AddFormLayout (string name)
 Creates and adds a FormLayout to the Project.
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.
DataSource GetDataSource (string name)
 Gets the DataSource information from the Project.
FormLayout GetFormLayout (string name)
 Gets the FormLayout information from the Project.
void RemoveDataField (DataField field)
 Removes a DataField from the Project.
void RemoveDataField (string name)
 Removes a DataField from the Project.
void RemoveDataSource (DataSource dataSource)
 Removes the DataSource from the Project.
void RemoveDataSource (string name)
 Removes the DataSource from the Project.
void RemoveFormLayout (FormLayout form)
 Removes a FormLayout from the Project.
void RemoveFormLayout (string name)
 Removes a FormLayout from the Project.
override string ToString ()
 Returns a string representation of the instance.

Properties

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

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 [get, set]

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 [get, set]

Gets/Sets the description of the Project.

Returns:
The description of the Project

Gets the first DataField of the Project.

Returns:
DataField object for the first DataField
See also:
DataField

Gets the first DataSource defined in the Project.

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

Gets the first FormLayout of the Project.

Returns:
FormLayout object for the first FormLayout, null if no FormLayout exists
See also:
FormLayout
string Name [get, set]

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

Gets the number of DataSources defined in the Project.

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

Gets the number of FormLayouts defined in this Project.

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

© 2006-2024 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Wed Aug 7 2024 17:29:42 for TFORMer SDK - NET with doxygen 1.7.6.1