Table of Contents

Class Application

Namespace
PolarStudio
Assembly
PolarStudio.dll

An application in the presentation-layer as started for a user in a session. Is tied to an BudaApplication in the data-layer.

public class Application : IDisposable, PolarWeakEventListener
Inheritance
Application
Implements
Inherited Members
Extension Methods

Fields

BackHtmPrintTitleTC

A title for when printing the back page

public string BackHtmPrintTitleTC

Field Value

string

BackHtmWindowTitleTC

The title to use in the browser for when no forms are open

public string BackHtmWindowTitleTC

Field Value

string

BackHtmlPrintEnabled

A boolean to set if the Print button is enabled when no forms are open

public bool BackHtmlPrintEnabled

Field Value

bool

BackHtmlPrintFooterTC

The html footer when printing the back page

public string BackHtmlPrintFooterTC

Field Value

string

BackHtmlPrintHeaderTC

The html header when printing the back page

public string BackHtmlPrintHeaderTC

Field Value

string

BootstrapColumnClassPrefix

The prefix to set the width in columns for when using Bootstrap. For example 'md-'. Can be overruled per form.

public string BootstrapColumnClassPrefix

Field Value

string

BootstrapFormRowClassesTC

The CSS class to add to a row in bootstrap. For example 'row'. Can be overruled per form.

public string BootstrapFormRowClassesTC

Field Value

string

Buttons

Custom buttons for this application

public CustomButtons Buttons

Field Value

CustomButtons

DisableMultiForm

MultiForm means multiple forms of one type can be opened. This feature can be suppressed with this property. In that case, if a new form is opened, all currently open forms of that type are closed.

public bool DisableMultiForm

Field Value

bool

DisabledTextBoxBackColor

The html color of Disabled textboxes. Can be overruled per form.

public string DisabledTextBoxBackColor

Field Value

string

ErrorCssClass

The css class to add to textboxes/html controls that have an error. Can be overruled per form.

public string ErrorCssClass

Field Value

string

ErrorTextBoxBackColor

The html color of textboxes/html controls that have an error. Can be overruled per form.

public string ErrorTextBoxBackColor

Field Value

string

ShowControlExplanations

To show explanations for all controls using title-tags when rendering the captions for the controls.

public bool ShowControlExplanations

Field Value

bool

UseBootstrapDesign

To use BootStrap design.

public bool UseBootstrapDesign

Field Value

bool

Properties

ActiveForm

Returns the currently active form or Nothing if none.

public Form ActiveForm { get; }

Property Value

Form

AllForms

Returns a collection with all Forms (including MDI forms and interactive child forms), in order of opening

public IndexedCollection<Form> AllForms { get; }

Property Value

IndexedCollection<Form>

ApplicationID

Returns the ApplicationID for the current application.

public int ApplicationID { get; }

Property Value

int

ApplicationPID

Returns the PID for the current application.

public string ApplicationPID { get; }

Property Value

string

BackHtmlTC

Gets/sets the HTML to use for the Back Page (the page that is shown when no forms are open).

public string BackHtmlTC { get; set; }

Property Value

string

BootstrapFormContainerTC

Gets/sets the HTML to use for the Bootstrap form-container.

public string BootstrapFormContainerTC { get; set; }

Property Value

string

BudaApplication

Returns the related BudaApplication object in the data layer.

public BudaApplication BudaApplication { get; }

Property Value

BudaApplication

BudaEngine

The Engine for this application

public BudaEngine BudaEngine { get; }

Property Value

BudaEngine

BudaSession

The BudaSession (the session in the data-layer) for this application.

public BudaSession BudaSession { get; }

Property Value

BudaSession

CaptionTC

Gets/sets the CaptionTC for the current application.

public string CaptionTC { get; set; }

Property Value

string

DefaultBootstrapLabelWidth

Gets/sets the default width for the labels expressed in Bootstrap-columns (1-12).

public int DefaultBootstrapLabelWidth { get; set; }

Property Value

int

Forms

Returns a collection with the 'normal' Forms (excluding MDI forms) in the order of visibility (the first is visible on screen).

public IndexedCollection<Form> Forms { get; }

Property Value

IndexedCollection<Form>

FormsInTabsheetOrder

Returns the visible forms in the order of the tabsheets. Excludes MDI forms.

public IndexedCollection<Form> FormsInTabsheetOrder { get; }

Property Value

IndexedCollection<Form>

MenuItems

Returns the MenuItems for this application as are currently visible for the user.

public MenuItems MenuItems { get; }

Property Value

MenuItems

MessagesProfile

To set a MessagesProfile for this application.

public string MessagesProfile { get; }

Property Value

string

Name

Returns the name for the current application.

public string Name { get; }

Property Value

string

Session

Returns the Session in the presentation layer.

public Session Session { get; }

Property Value

Session

SupportActiveWindowsList

Depricated

public bool SupportActiveWindowsList { get; }

Property Value

bool

SupportFilter

Depricated

public bool SupportFilter { get; }

Property Value

bool

SupportGoToList

Depricated

public bool SupportGoToList { get; }

Property Value

bool

SupportHelp

Depricated

public bool SupportHelp { get; }

Property Value

bool

SupportMinimizeFormButtons

Depricated

public bool SupportMinimizeFormButtons { get; }

Property Value

bool

SupportWindowsTabSheets

Depricated

public bool SupportWindowsTabSheets { get; }

Property Value

bool

TextButtons

To create TextButtons in the application

public TextButtons TextButtons { get; }

Property Value

TextButtons

Methods

Abandon()

Abandons the connection to the database.

public void Abandon()

ActivateForm(object, BudaDataSet, string, bool, object, string, bool, bool, bool, object, string, string, bool, bool, Form, string)

To activate a form. Can be used to either re-activate or to open a new form)

public Form ActivateForm(object pFormID, BudaDataSet pParentDataSet = null, string pFollowedRelationship = "", bool pGotoRelatedTable = false, object pActivateRecordID = null, string pBaseFilter = "", bool pSuppressDefaultFilter = false, bool pReloadForm = false, bool pLoadAsNextTabsheet = false, object pRequireFilter = null, string pDefaultPredefinedFilter = "", string pDefaultOrderSettingsName = "", bool pOpenAsMultiForm = false, bool pSuppressViewConditions = false, Form pFormToRegisterAsParent = null, string pAdditionalTag = "")

Parameters

pFormID object

The ID (an Int as in the repository) or the name of the form to activate. Can also be a full ExtendedFormID to re-activate an existing form.

pParentDataSet BudaDataSet

A parent dataset when opening a 'related' form (to show related records or to show a foreign key)

pFollowedRelationship string

The name of the relationship that is followed (see pParentDataSet)

pGotoRelatedTable bool

A boolean to indicate if going to a related table (true) or to a foreign key (false)

pActivateRecordID object

The ID of the record to initially activate.

pBaseFilter string

The base filter for this form. The user will not be able to remove this limitation.

pSuppressDefaultFilter bool

Pass True to suppress applying the default set filter.

pReloadForm bool

Pass True to force re-loading an existing form instead of opening a new form.

pLoadAsNextTabsheet bool

Pass as True to make the tabsheet appear next to the tab of the current form instead of appearing at the end.

pRequireFilter object

To make sure no unfiltered set of records is shown.

pDefaultPredefinedFilter string

The name of the default predefined filter to apply.

pDefaultOrderSettingsName string

The name of the default ordersetting to apply.

pOpenAsMultiForm bool

To forse opening as a new form, even if a form of the same type and with the same conditions is already open.

pSuppressViewConditions bool

To suppress view conditions. Use with care.

pFormToRegisterAsParent Form

To register a form as 'Parent'. Can be used for navigating.

pAdditionalTag string

This text is added to the Tag when opening the form. Is already available during the OnOpenForm event.

Returns

Form

The activated or newly opened form.

Exceptions

Exception

CloseApplication()

Closes the application

public bool CloseApplication()

Returns

bool

DataExchangeUI(bool)

The user interace object for the Data Exchange tool for this application.

public DataExchange DataExchangeUI(bool pRenewObject = false)

Parameters

pRenewObject bool

Pass True to force recreating a new object.

Returns

DataExchange

Destruct()

Destructs the Application and releases all resources.

public void Destruct()

Dispose()

The destructor

public void Dispose()

~Application()

Destructor.

protected ~Application()

GetDefaultFormIDforTable(int, object)

To get the default FormID for a given TableID. Does call scripts '{TableName}_GetDefaultForm(Context)' and '{ApplicationName}_GlobalGetDefaultForm(Context, "{TableName}")'. Then no FormID is given by these scripts, the default form as defined in the repository is used.

public int GetDefaultFormIDforTable(int pTableID, object pContextObject = null)

Parameters

pTableID int
pContextObject object

Returns

int

OpenMDIform(object, BudaDataSet, string, bool, object, string, bool, object, string, string, bool, Form, string)

To open an MDI form. (Multiple Document Interface). MDI forms are always Interactive and do not show up in the normal list of Application.Forms. They do appear in Application.AllForms. MDI forms can also be used for master-detail forms etc.

public Form OpenMDIform(object pFormID, BudaDataSet pParentDataSet = null, string pFollowedRelationship = "", bool pGotoRelatedTable = false, object pActivateRecordID = null, string pBaseFilter = "", bool pSuppressDefaultFilter = false, object pRequireFilter = null, string pDefaultPredefinedFilter = "", string pDefaultOrderSettingsName = "", bool pSuppressViewConditions = false, Form pFormToRegisterAsParent = null, string pAdditionalTag = "")

Parameters

pFormID object

The ID (an Int as in the repository) or the name of the form to activate. Can also be a full ExtendedFormID to re-activate an existing form.

pParentDataSet BudaDataSet

A parent dataset when opening a 'related' form (to show related records or to show a foreign key)

pFollowedRelationship string

The name of the relationship that is followed (see pParentDataSet)

pGotoRelatedTable bool

A boolean to indicate if going to a related table (true) or to a foreign key (false)

pActivateRecordID object

The ID of the record to initially activate.

pBaseFilter string

The base filter for this form. The user will not be able to remove this limitation.

pSuppressDefaultFilter bool

Pass True to suppress applying the default set filter.

pRequireFilter object

To make sure no unfiltered set of records is shown.

pDefaultPredefinedFilter string

The name of the default predefined filter to apply.

pDefaultOrderSettingsName string

The name of the default ordersetting to apply.

pSuppressViewConditions bool

To suppress view conditions. Use with care.

pFormToRegisterAsParent Form

To register a form as 'Parent'. Can be used for navigating.

pAdditionalTag string

This text is added to the Tag when opening the form. Is already available during the OnOpenForm event.

Returns

Form

The newly opened MDI form

PolarTimerManagerUI()

The user interace object for the Polar Timer Manager for this application.

public PolarTimerManagerUI PolarTimerManagerUI()

Returns

PolarTimerManagerUI

ReDetermineMenuItems()

To force redetermining the visible menu items.

public void ReDetermineMenuItems()

ReportUI()

The user interface object for Polar Reporting for this application.

public ReportUI ReportUI()

Returns

ReportUI

SendToBack()

To send the application to the back of shown applications

public void SendToBack()

ToolsUI()

The user interface object for Polar Tools for this application.

public PolarTools ToolsUI()

Returns

PolarTools