Default Enterprise Application
When the user creates a new application from the Enterprise application, as shown in the figure below, it already comes with a set of pre-ready tags, screens, alarms, etc. This information is called "Default Application" and allows the user to use it to more quickly generate your application.
Goal
In this section, all the features of the component are presented in version 2016.2 such as summaries, searches, filters, leads, and scripts screens. A walkthrough of how to import items from this component from the previously exported Action.Net will also be described.
It should be noted that the information presented here should evolve over time, since Spin, due to user request, should always improve the Default Application, providing new features, Symbols, Figures, etc.
Prerequisites
Projects and environment
The information in this chapter is based on the project editing module of the Action.Net. For the current version the prerequisites for this guide are:
Net Framework 4.6.2 platform or higher installed on the machine;
Action.Net 2016.2.51 version or higher installed on the machine;
SQL Server or SQLite Database Manager; and
Component Action.Net related to the features of the DefaultNewProject
(if applicable).
Nomenclature
When referring to a section of the project, in this chapter this reference is made from one of the editing modules (Edit, Draw, Run or Info), from one of the sections of this module and finally from one of the subsections of the selected section (usually a tab of the section screen). For example: The section described in the item below Run > Build > References refers to the Run module, Build section, References tab.
External references
Any project generated from the DefaultNewProject should reference the DLLs developed by SPIN and required for the execution of the project modules. This list of references is maintained when generating a new project from the DefaultNewProject full version
2016.2.95. However, when creating a new project with DefaultNewProject empty, you must reference these libraries before importing the Action.Net component that contains the developed features.
The following is the list of files to reference in the "Run - Build - References" section. If you want, copy the table below to an Excel and copy the Excel rows to the Action.Net.
Always when adding new references, make sure they are all correct by clicking the "Verify References" button in the Run > Build > References.
Location ‐ Languages
Prerequisites
Project Setup
Every project when created must indicate which language to run in. This setting can be done under "Info - Project - Settings" in the "Culture info" field.
The use of dictionaries described in the following item depends on the selection made in this section. By default DefaultNewProject is configured for use of Portuguese (Brazil).
Configuration of dictionaries
In the current DefaultNewProject, two new string dictionaries have been created in "Run - Dictionaries - Localization":
pt_BR for using strings in Portuguese; and
en_US for the use of strings in English.
All string dictionaries are keyed to the "OriginalText" field. It is the strings contained in this field that must be referenced in all objects marked as localizable and in translation search calls by the @Client.Locale(string param) method. The strings contained in the "TranslatedText" field refer to what should be shown as text in that particular language.
Note that the strings in the "OriginalText" field of the pt_BR are the same as in the en_US. If there is a need to create a dictionary from another language, the texts of this field must be the same in the "OriginalText" field of the new dictionary.
By default, the "IDS_NomeDoString" script identification model was adopted, where NameDoString refers to the name given to that string and "IDS_" simply implies that this string is a refers to a string dictionary ID.
Ex: IDS_Exit has as "TranslatedText" in the en_US the word "Exit". In the dictionary pt_BR to the field refers to the word "Exit".
Not all items in the "OriginalText" field follow the same pattern. Text used in AlarmWindow controls to date is fixed to the names of your table fields.
Ex: AckRequired, Value, Message, Priority, etc...
Texts used by scripts must be added manually in dictionaries. Texts used by controls can be loaded by clicking the "Load strings" button in the "Run - Dictionaries - Localization" section.
Features
Use in controls
Data controls Action.Net have the "Localizable" properties configured to automatically show text configured in a dictionary.
As control text, you must enter the name referring to the "OriginalText" field mentioned in the previous item.
Use in scripts
The dictionaries you create are scripted in the client startup task depending on which culture was configured in the "Info - Project - Settings" section.
If the project is Portuguese, the pt_BR is loaded, otherwise the dictionary will en_US loaded.
In case of need to use strings located in script, you use the Locale method of the Namespace Client whose signature is as follows:
public string
Where: the text parameter refers to the name registered in the "OriginalText" field in "Run - Dictionaries - Localization".
You can also use the string method. C# format to fetch text that needs to go through a transformation or concatenation of strings.
E.g.: We have the following item registered in the pt_BR:
OriginalText | TranslatedText |
IDS_Maneuver_CMD_Signal_Cancel | Maneuver {0} CANCELLED - Failed Command Signaling |
We can include a custom alarm message of type "AuditTrail" to the system using the following code:
The result is shown below:
On this page: