TaskMerlin API
The TaskMerlin API enables you to create custom .NET applications that use a TaskMerlin database.
The API exposes objects for programmatically creating and modifying TaskMerlin projects and tasks.
The API is named Interfathom.TaskMerlinData.dll and is located in the folder where TaskMerlin is
installed on your PC. There is also an API Class Library Help file provided called TaskMerlinData.chm.
Example Project
You can download an API example project
as a ZIP file. The example project is written in C# and can be compiled with Visual Studio. Note
that TaskMerlin needs to be installed to compile and run the example project.
The example project uses the TaskMerlin API to connect and logon to MyTasks.tmdb
and display all the projects and tasks in a tree view. It also provides buttons
for viewing information about an item, editing the summary, deleting an item or
creating a new item.
Example Source Code
To get an idea of what code that uses the TaskMerlin API looks like, the following method
iterates through the items in the Inbox and displays the priority of all incomplete tasks.
private void ShowItems(LoginSession loginSession)
{
ItemCpt InboxCpt = loginSession.Items.InboxCpt;
foreach (ItemCpt Cpt in InboxCpt.Cpts)
{
bool IsTask = Cpt.ItemTypeCpt.Name == "Task";
bool IsClosed = Cpt.StatusTypeCpt.IsClosed;
if (IsTask && !IsClosed)
{
MessageBox.Show(Cpt.Summary +
" has a priority of " + Cpt.PriorityTypeCpt.Name);
}
}
}