Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleScreen Configuration

The <ScreenConfig> subsection within the <AppConfig> main section is required to specify any ‘root’ menu screens within the application.  For more information about how Texplore navigates from screen to screen see Browsing from Screen to Screen.

Subnodes in the <ScreenConfig> subsection must conform to the following format:

Code Block
<Screen ScreenID="MainMenu"
            ClassName="MyNamespace1.MainMenu,MyAssembly1"
            Default="True" />

<Screen> subnodes have the following attributes:

Parameter Name

Value

ScreenID

This is the name by which this screen will be known within the HMI application.  The ScreenID is used when linking from one screen to another.

ClassName

This is the fully qualified assembly name for the class that defines this screen.

Default

This Boolean flag indicates whether or not this is the default screen for the application.  Only one <Screen> subnode should have this attribute set to “True”.  This attribute can be omitted on all other <Screen> subnodes.

...

Expand
titleApp Variables

The <AppVariables> subsection within the <AppConfig> main section is used to define application-specific variables used by the HMI application.  Each of the subnodes in this section should specify the key name of the variable and its initial value.  This variables are all stored as strings within the HMI application.

Example Configuration Section

Following is an example <AppConfig> section for a given HMI application.

Code Block
<AppConfig>
  <!-- Application settings -->
  <add key="EnableTsecurity" value="True" />
  <add key="DefaultPrivileges" value="Priv1;Priv2" />
  <add key="DefaultCulture" value="en" />

  <!-- Tsecurity settings -->
  <!-- Commenting out the following three entries selects the -->
  <!-- default settings, which is appropriate for most systems -->
  <!--add key="TsecurityHost" value="127.0.0.1" /-->
  <!--add key="TsecurityPort" value="8080" /-->
  <!--add key="TsecurityApp" value="BCS" /-->

  <!-- Screen Configuration -->
  <ScreenConfig>
    <Screen ScreenID="MainMenu"
            ClassName="MyNamespace1.MainMenu,MyAssembly1"
            Default="True" />
    <Screen ScreenID="SubMenu"
            ClassName="MyNamespace2.SubMenu,MyAssembly2" />
  </ScreenConfig>

  <!-- Login Configuration -->
  <LoginConfig>

    <!-- Login functionality settings -->
    <add key="AllowGuest" value="True" />
    <add key="RequireUserIDForGuest" value="True" />
    <add key="PreloadUserID" value="True" />
    <add key="AllowAssumedAuthenticated" value="True" />
    <add key="SessionTimeout" value="2" />
    <add key="PasswordExpirationNotice" value="14" />

    <!-- Login display settings -->
    <add key="BackColor" value="Navy" />
    <add key="TitleColor" value="Yellow" />
    <add key="ForeColor" value="White" />
    <add key="ErrorColor" value="Red" />
    <add key="DisplayLanguages" value="True" />
  </LoginConfig>

  <Languages>
    <add Language="en">
      <add key="LanguageName" value="English" />
      <add key="Tag" value="_en" />
      <add key="Title"
       value="Tsentry Real-Time Process Control System" />
      <add key="UserName" value="User Name" />
      <add key="Password" value="Password" />
      <add key="Domain" value="Domain" />
      <add key="Language" value="Language" />
      <add key="Login" value="Login" />
      <add key="LoginAsGuest" value="Login as Guest" />
      <add key="ChangePassword" value="Change Password" />
    </add>
    <add Language="es">
      <add key="LanguageName" value="Español" />
      <add key="Tag" value="_sp" />
      <add key="Title" value="Tsentry Sistema Control Proceso" />
      <add key="UserName" value="Usuario" />
      <add key="Password" value="Contraseña" />
      <add key="Domain" value="Domain" />
      <add key="Language" value="Idioma" />
      <add key="Login" value="Entrada" />
      <add key="LoginAsGuest" value="Entrada como huésped" />
      <add key="ChangePassword" value="Cambio contraseña" />
    </add>
    <add Language="it">
      <add key="LanguageName" value="Italiano" />
      <add key="Tag" value="_it" />
      <add key="Title" 
       value="Tsentry Real-Time Process Control System (Italian)" />
      <add key="UserName" value="Utente" />
      <add key="Password" value="Parola d'accesso" />
      <add key="Domain" value="Dominio" />
      <add key="Language" value="Lingua" />
      <add key="Login" value="Entri" />
      <add key="LoginAsGuest" value="Entri come ospite" />
      <add key="ChangePassword" value="Cambi la parola d'accesso" />
    </add>
  </Languages>

  <AppVariables>
    <!-- Application variables and default values -->
    <add key="variable1" value="1" />
    <add key="variable2" value="2" />
    <add key="variable3" value="Test Variable 3" />
  </AppVariables>
</AppConfig>

...

Expand
titleTexplore Configuration File

Texplore stores some data in its own configuration file for use the next time the application is started.  The application configuration file is located in the same folder as the Texplore executable file and is named Texplore.exe.config.

Currently, the only persistent information stored in the configuration file is the history of HMI applications to which the TSE program has connected.

Following is a sample configuration file:

Code Block
<?xml version="1.0" encoding="utf-8"?>

<!-- Configuration file for the Tsentry Screen Explorer -->
<configuration>
  <configSections>
    <!-- Do not edit this section -->
     <section name="TexploreSettings"
      type="TPRI.HMI.Application.Explorer.TexploreSettingsSectionHandler,Texplore" />
  </configSections>

  <appSettings>
  </appSettings>

  <TexploreSettings>
    <AppHistory Host="127.0.0.1" App="TsentryHMI" />
  </TexploreSettings>

</configuration>
Expand
titleCommand Line Parameters

The following command line parameters are supported by Texplore:

  • /C Host/AppName       
    Automatically connect to the specified TSENTRY host and start the named HMI application.

  • /L   
    Run the application using only the locally installed files and assemblies (do not automatically download updated files from the host computer).

  • /K   
    Run Texplore in kiosk mode (full-screen without title bar).

  • /T path  
    Exit application when user disconnects from host and automatically restart the version of Texplore.exe specified by path.  This parameter should only be used internally by Texplore.

Expand
titleUser Interface

Expand
titleRequirements for Texplore Screens

All screens to be displayed in the Texplore environment must conform to the following:

  • Each screen must inherit, either directly or indirectly, from the .NET Framework class System.Windows.Forms.Form.

  • Each screen must implement the TPRI.Tscreen.ITscreen class interface.

This is required so that the Texplore container can properly interact with and display all custom application screens.

Expand
titleBrowsing from Screen to Screen

One screen can link to another in a variety of different methods:

  • A screen can have a TPRI.HMI.Controls.CmdButton or TPRI.HMI.Controls.LinkLabel object on its display that specifies the ScreenID of the new screen in its LinkedScreen property.

  • A screen can raise the ITscreen.ActivateScreen(..) event, which is passed a TPRI.Tscreen.ActivateScreenEventArgs object that specifies the ScreenID of the new screen.

The Texplore application internally has a TPRI.Tscreen.TscreenMgr object that manages navigation between screens.  In either of the cases above, this TscreenMgr object will use the ScreenID name to find the appropriate new screen as follows:

  1. If a screen with this ScreenID is already registered in the HMI application configuration file in the AppConfig/ScreenConfig section of the application configuration file.

  2. If there is no screen currently registered with the specified ScreenID, the TscreenMgr will check the assembly of the original screen to see if there is a class whose name matches the ScreenID in the same namespace as the original screen.

For instance, suppose the application configuration file has the following <ScreenConfig> section:

Code Block
<ScreenConfig>
  <Screen ScreenID="MainMenu"
          ClassName="MyNamespace1.MainMenu,MyAssembly1"
          Default="True" />
  <Screen ScreenID="SubMenu"
          ClassName="MyNamespace2.SubMenu,MyAssembly2" />
</ScreenConfig>

When the application is started, a MyNamespace1.MainMenu object will be loaded from the MyAssembly1.dll assembly, assigned a ScreenID of “MainMenu”, and initially presented to the user.  This occurs because this screen is marked with the Default="True" attribute in the HMI configuration file.  At the same time, a MyNamespace2.SubMenu object from the MyAssembly2.dll assembly will be registered with Texplore and its TscreenMgr using the ScreenID of "SubMenu".

If the NtRtMenu screen has a CmdButton on it whose LinkedScreen property is set to “SubMenu”, the TscreenMgr will immediately find the SubMenu screen in its list of registered screens and activate it.

However, if the CmdButton on the MainMenu screen instead specifies “OtherScreen” in its LinkedScreen property, the TscreenMgr will find that there is no screen currently registered with that ScreenID.  Therefore it will check if the MyAssembly1.dll assembly contains a class by the name MyNamespace1.OtherScreen; if it finds one then that screen will be immediately registered, created and activated.  If this class does not exist then the navigation will be canceled.

Consequently, only top-level menus must be specified in the ScreenConfig section of the application configuration file as long as all classes corresponding to screens linked from those menus are located in the same namespace as the top-level menu.

Expand
titleSecurity and Timeouts

The Texplore application internally has a TPRI.Tsecurity.TsecurityMgr object that manages security for the HMI application.  It is responsible for notifying each screen that is loaded of the currently logged in user and his security access key.  However, it is up to each screen (and each object loaded by each screen) to enable or disable its own components as appropriate based on this security access key.

In addition, the TsecurityMgr object watches the HMI display for inactivity.  If no user interacts with the HMI display for the number of minutes specified by the SessionTimeout key in the AppConfig/LoginConfig section of the HMI application configuration file, the TsecurityMgr will automatically timeout the current login session.  When this happens the Login screen is immediately redisplayed for this user.  At this point if the user reauthenticates again as the original user, he can return to the same point in the HMI application.  If he reauthenticates as a new user then the previous HMI application session will be reset and the user will be log in as if he had not been logged in before.

Standard Screens

The following sections describe each of the standard screens provided with TSENTRY.

Expand