Introduction
The ENCX evaluation download comes with built samples ready to use. Here are some notes about the samples. Source code for the samples (and .NET controls) is provided. Please read and adapt this code to help your projects.
After installing the evaluation the samples are available from the start menu. Start >> All Programs >> ENCX SDK >> Samples.
Chart Viewing Samples
EncView1.exe
Views the sample ENC cells and sample CherSoft World Vector Shoreline information in the demonstration SENC. When the application starts the display will be centred on a zoomed out view of the sample area (the river Humber, UK). Use the mouse wheel to zoom in and out.
This application uses the ENCX .NET S-57/ENC control and is written in VB .NET.
RasView1.exe
Views the sample raster charts in the demonstration RENC. Enter a chart number (e.g. 107) into the 'choose chart' edit box and click on the 'go' button to view the chart. Charts in the demonstration RENC are 107, 109 and 3497.
This application uses the ENCX .NET raster control and is written in VB .NET.
EncView_MFC.exe
Another application which displays the demonstration ENC cells and world shoreline (similar to EncView1, see above). This application also crudely demonstrates overlaying information onto a chart by drawing a large white triangle on the display (see the source code for more information).
When the application starts up you will be prompted to enter a SENC path. The path to the demonstration SENC will be something like..
c:\program files\encx sdk\senc_demo
(dependant on where you installed the evaluation on your PC).
It is written in C++ and uses the MFC framework - it contains an MFC view derivative based on an ENCX S57Draw object.
RasView_MFC.exe
This program displays raster charts and like EncView_MFC you will be prompted for a path. Something like..
c:\program files\encx sdk\renc_demo
This sample demonstrates overlaying of information onto a chart by drawing a big red dot on the charts. This sample was written in C++ using MFC - it contains an MFC view derivative based on an ENC RasDraw object.
ViewCharts.exe
This is a VB 6 application that lists the ENC cells, lists the raster charts and displays both chart types.
If you click on a raster view it will bring up an ENC view centred around that point.
It demonstrates:
Chart Catalogue Samples
EncList1.exe
This application demonstrates enumerating the chart cells in a SENC (a SENC is a special folder in which S-57/ENC cells are held) and observing any changes. It is important to observe the catalogue because the list may not be complete on application startup. Written in VB.NET.
RasList1.exe
This demo lists the charts in the RENC (a RENC is where raster charts are installed) and observes changes to that list. It is important to observe the catalogue because the list may not be complete on startup - this is to ensure the programs start quickly.Written in VB.NET.
Licensing Samples
ENCX is a licensed product as are many commercial charts (see Licensing and Security for more articles).
InstallationId.exe
See this article Getting the Installation ID
DotNetDongleMonitoring.exe
This sample monitors the status of the dongle (software or hardware). See Monitoring the Dongle.
Andrew Nibbs has developed software and managed projects for Chersoft for 11 years. He specialises in C++ and does a bit of C# and even less VB. He once wrote a Python script.