Since a few releases it's possible to not only extend the Topobase Client and Web applications with own plug-ins. Developers can now also extend the Topobase Administrator with new functionality. The easiest way to do that is to create a new DocumentAdminPage or an ApplicationAdminPage. The only difference between them is wether they relate to one document or not. All the AdminPages are listed in the tree on the left side of the Topobase Administrator. Of course , the DocumentAdminPages are not loaded and displayed until the user opens a workspace with at least one document.
I'll show you a step by step guide how to develop such a DocumentAdminPage.
After you have setup a new solution and project you can add a new class inherited from DocumentAdminPage:
public partial class MyAdminPage : DocumentAdminPage
The DocumentAdminPage is in the namespace Topobase.Forms.Desktop:
using Topobase.Forms.Desktop;
Within the constructor you have to set the name of your DocumentAdminPage:
this.Text = "myAdminPage";
Please note that within the constructor you don't have access to the Document or the Connection instance.
If you would like to access an open Topobase connection you have to catch the event ActivatedFirstTime. Therefore open your DocumentAdminPage in the designer, in the properties window of the MyAdminPage switch to the Events and double click the ActivatedFirstTime event. Visual Studio now generates a new method where you can implement your initialization logic.
private void MyAdminPage_ActivatedFirstTime(object sender, EventArgs e)
{
}
Like for every other plug-in you also need a TBP file to let Topobase know that there is a new plug-in available. Within the new TBP file add the following node:
<DocumentAdminPage ClassName="MyAdminPage" />
That's it. You should now be able to compile the DLL and copy it together with the TBP to the Topobase Administrator bin directory and test it. If that doesn't work try to download the following sample project. I have developed it in C# against the released version of Topobase 2010 (7.00.41).
Download MyAdminPage.zip (7.2K)
I plan to provide more How-To posts in the next couple of weeks to show you step by step how to develop a nice AdminPage.
Comments