The Uniconta client is a normal Windows program developed using .NET. It uses WPF (Windows Presentation Foundation) for its user interface. Since the client executes on the user’s PC, we can take full advantages of the many possibilities that .NET offers.
Generally, a .NET program consists of several DLL’s (Dynamic Linked Library), that are linked together to form an executable program. Uniconta.exe as an example.
However, .NET can also dynamically load a DLL after the program has started and call classes and methods in the DLL.
In Uniconta we take advantage of this feature and have develop a functionality, so clients can enhance the Uniconta client by dynamically adding new functionality.
How does it work
The idea behind the dynamically loading of the DLL is to be able to add new menu points in the Ribbon menu that we have on our screens. The user is able to add new menu points that will call his DLL and pass control to his DLL. We will pass the “the current environment” to the DLL and the DLL can then interact with data and call the server.
As an example, if the user adds a menu point in the Debtor Order Line screen, and the user press that menu point, we will call the DLL behind that menu point. We will pass the Debtor Order, which is the “Master” for the Order Line screen. We will pass the “List” of all Order Lines in the grid, and we will pass “Current”, which is the Order Line in focus. We will also pass the CrudAPI that the screen has instantiated, which contain the logged in session and current Company.
The DLL can now interact with the data passed. It can use the CrudAPI passed to query the server, update records on the server and instantiate other API’s that we offer in Uniconta API. The DLL has full access to all functions, since we have passed a logged in session in the CrudAPI.
IPlugin interface.
For Uniconta to be able to detect and instantiate a class in the DLL, the class must implement the IPlugin interface. A DLL can contain many classes that implement the IPlugin interface, and we are able to call any of them.
You need to register your DLL in the Tools menu. You register the DLL by its name. You enter the name of the class to be instantiated and you select with Uniconta control (screen) where the menu should appear.
The DLL must be stored on the user’s PC.
The list of menu points is stored in a table (UserPlugin) on the server under the users login Id.
Partner DLL
In the Administration menu, we have given our partners the privilege of uploading their DLL’s on the Uniconta server. The partner can then register plugins for his users and refer a partner DLL. This way the partner does not have to install any DLL’s in the user’s PC. When the user activates a menu point that refer the Partner DLL, the Uniconta client will load the DLL from the server. When the partner uploads a new DLL, it will load the new DLL on the client.
Partner DLL’s are stored in the table PartnerDLL and is stored under the Partner Id.
Develop a Plugin
To help you develop a Plugin, we have developed a Visual Studio project that you can download from our website. The project consists of two parts. First part is the plugin and the second part is a Uniconta Client simulator. The simulator will instantiate your plugin, just as it does inside Uniconta. However, inside Uniconta, you do not have the possibility to debug your code. In the simulator, you can set breakpoints in your plugin and step through your code. Once the plugin works correctly, you can install the plugin DLL on your PC, or upload in your Partner menu and use it in Uniconta Client.
Specialized IPlugin
The base interface for all plugins is IPlugin. We have some specialized interfaces of IPlugin that we use to enhance the features of Uniconta.
IPaymentPlugin
This interface is used to enhance the list of supported bank payment formats, when we generate payment files to pay creditors.