Tabs Studio Blog (organizing Visual Studio document tabs)

August 25, 2009

Add-in Manager

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 6:57 am

I’ve created the Add-in Manager dialog that you can open using the Tabs Studio context menu or TabsStudio.Connect.Addins command:

Tabs Studio Add-in Manager dialog

Tabs Studio Add-in Manager dialog


The dialog shows all loaded add-ins. Add-in information is extracted from the version resource in the add-in dll file. Add-in Name is extracted from the ProductName key, in C# project it is set using the AssemblyProduct attribute. Description is extracted from the FileDescription key defined by the AssemblyTitle attribute. Version is extracted from the ProductVersion key defined by the AssemblyFileVersion attribute.

To support configurability the add-in’s main class must implement the TabsStudioExt.IConfigurable interface:

public class Tracer : TabsStudioExt.ITabsStudioAddin, TabsStudioExt.IConfigurable

This interface has only one method:

void Configure(System.Windows.Window parent);

The parent parameter is to set the Owner property of the add-in configuration dialog:

public void Configure(System.Windows.Window parent)
{
    SettingsDialog dialog = new SettingsDialog(settings);
    dialog.Owner = parent;
    dialog.ShowDialog();
}

Blog at WordPress.com.

%d bloggers like this: