Skip to main content

How to Get Sample ManualStation Custom Code to Work?

Article # 3049355 - Page views: 67


After installing eFlow (default paths), we can find the sample custom codes for ManualStation at "C:\Program Files (x86)\TIS\eFlow 6\Customization Samples\Manual Station".

Note: If it is eFlow 5 then it is similar path, instead of eFlow 6, it is eFlow 5.

However it could not work.



The sample is using an old XtraBars package, outdated app.config so it requires some settings to be done.  It also depends on the version especially if there has been some STS related changes.



1) Set x86 CPU for the solution at Configuration Manager

At Visual Studio - Set x86 for Configuration Manager.png

2) Update your app.config

  • Get your current eFlow version for the DataEntry.exe.config.
  • Copy the content to replace the app.config but retain the last 4 entries related to the xBar.
  • Set the .Net Framework version accordingly from your Visual Studio and where it is compatible with your eFlow version.

Update your app.config for eFlow ManualStation Sample.png


If you are using eFlow (dll version or 6.0.3 (dll version or higher version, there were changes to STS approach so custom codes need to be sync up to align.  Therefore other than the above 2 steps, you will need to do a few more changes at the Custom Codes.  Please see below summary.

3a) Add the followings to your MainForm.cs (at the "using section" at the top of the codes):

//For new STS Approach: Needed for the new methods, etc.
using TiS.Core.TisCommon.Security;
using TiS.Core.Application.Security;

3b) Set the AppName and as class variable so that they will be available in all methods within the class - aka "public" to all the methods.

Set the AppName and StationName Variables as Class Variables.png

3c) Add the new Method as shown in the screen shot below.

Add ValidateStationWritePermission Method.png

Here is the snippet codes for your convenience:

 //For new STS Approach: New ValidateStationWritePermission Method needed: This is to get the application role to check whether you have the permission to use it.
        private void ValidateStationWritePermission(string sApp, string sStation)
            if (!string.IsNullOrEmpty(sStation))
                var stationPermissionValidator = ((TisApplicationServices)m_oCSM.ApplicationServices[sApp]).GetStationPermissionValidator(sStation);
                if (stationPermissionValidator.Validate(PermissionsConst.TIS_PERMISSION_WRITE))
                    StationPermission.HasWritePermission = true;

3d) At the m_oGetCollectionsBarItem_ItemClick method, add the highlighted line of code to validate the station Write Permission.  Your credential used to launch the station should be given the role that has the write permission.

Add the ValidateStationWritePermission Call when Get Collection was triggered.png

3e) Get the AppName, StationName, check the station name is not empty.  Add your MessageBox prompt if you want to debug your codes so that you could in time to have the pause and you could attach the launched process to debug at Visual Studio.   Please refer to screen shot below. 

Use Class Variables for AppName and StationName - Validate Station Name and MsgBox for debugging.png

Here is the snippet codes for the call to check that the station name

//For new STS Approach: Validate that station name was specified so as to use it later in the new method.
            if (!StringUtil.IsStringInitialized(sStationName))
                DisplayErrorNoOwner("Station name must be provided");

Final Result:

You should be able to launch the station successfully - refer to below screen shot for virtualization of the station launch.

Custom Station Launch Test.png

Level of Complexity 



Applies to  

Product Version Build Environment Hardware
eFlow or earlier

New STS Approach:, or higher





Article # 3049355
  • Was this article helpful?