Getting Started with Addins
Ready to create a KioWare for Windows Addin? You'll need Visual Studio to get started.
If you're ready, start up Visual Studio and create a new project. You'll want to create a C# Class Library. We'll call our new addin project "MyKioWareAddin". Be sure to set your .NET Framework version to 4.5
Next, you need to add a reference to the KioWare library
KioWareClientSharedLib.dll. To do this, right click on the project, and select "Add Reference..." from the context menu.
Next, we'll drop in a 'using' statement at the top of the code.
Add this towards the top:
We want our new class to derive from
IKioWareAddin. To derive from another class, add
: IKioWareAddin after your class name.
IKioWareAddin, click on the light bulb to see more options, and select the "Implement Interface" option.
Name property, add code to return the new addin's name.
Under the "Tools" menu, select "Create Guid" to open the GUID creation utility.
Select "4. Registry Format", and click the "Copy" button to copy the new GUID to the clipboard. You should generate your own GUID, and not use the one generated in this example.
UniqueID property, add code to return the new addin's GUID. Paste the new GUID into the code.
Version property, add code to return the new addin's version. In this example, we'll use 220.127.116.11.
Load function by storing the host instance into a new private variable (for later use). The host instance will provide you with multiple ways to tie into the KioWare engine, so you'll likely need this reference at some point, and this is the only opportunity to get it.
UnLoad function by setting the host instance reference to null.
Open the project properties window by right-clicking on the project in the solution explorer menu, and going to properties.
Change the name of the output DLL so that it includes
.Addin. In the example, the output DLL will now be:
Go into the "Build Events" pane, and add the following code to the Post-Build Event:
set dir=%ProgramData%\KioWare Client\Addins\$(RootNameSpace)\ if NOT EXIST "%dir%" mkdir "%dir%" copy /y "$(TargetPath)" "%dir%$(TargetFileName)" if not %errorlevel%==0 exit 1 copy /y "$(TargetDir)$(TargetName).pdb" "%dir%$(TargetName).pdb"
At this point, you should be able to compile your project, and once the compile is finished, the output will automatically be copied into the correct place in order for KioWare to load the file:
Your addin should now load with the next launch of KioWare.