tide.Northwind.Branding

So – let’s dig right in and explore creating our first plugin for our RemObjects Hydra and DevExpress powered Northwind client application.

The first plugin we’re going to make for our Northwind tide client is a branding plugin. The branding plugin will implement tide.PluginInterfaces.IBrandingProvider. This interface has a few basic members that indicate the application name, company name, whether the application requires registration, a unique application Id, and a default skin name.

The application Id and option to require registration allow you to specifically identify your application and to specify whether your application will require registration in order to run. Another plugin interface, IRegistrationProvider, allows you to implement your own registration plugin to handle whatever registration logic you like (more on this in a future post).

Creating and implementing the branding plugin is simple (as are most of the tide plugin interfaces). You simply add a new project to the existing tide solution, and specify a Hydra Plugin Module. Then, to the plugin module project, add a new Hydra Non-Visual Plugin.  Add the tide.PluginInterfaces assembly as a reference and add the namespace tide.PluginInterfaces to the branding plugin uses section. Finally, indicate that the branding plugin implements IBrandingProvider.

For our simple Northwind client plugin, we’ll implement the interface as follows:

public string ApplicationName()
{
       return "Northwind Client";
}

public string ShortApplicationName()
{
       return ApplicationName();
}

public string CompanyName()
{
       return "Widgets and Gadgets, Inc.";
}

public string ShortCompanyName()
{
       return "Widgets and Gadgets";
}

public bool RequiresRegistration()
{
       return false;
}

public string ApplicationId()
{
       return "";
}

public string DefaultSkinName()
{
       return "Dark Side";
}

This will give us several things in our application automatically. These include:

  • A title bar caption
  • A default skin
  • A proper path in the application data directory for storing user settings

Running the application at this point gives the following:

WidgetsandGadgetsNorthwindClient.png

We get some additional other niceties out-of-the-box:

  • The form position is automatically saved and restored
  • Full skinning support
  • The selected skin is saved and restored

And that does it for a simple branding plugin for tide. Next we’ll create a connection plugin for our Northwind client. This will allow us to define our Northwind connection in the application’s settings dialog.

Advertisements

3 thoughts on “tide.Northwind.Branding

  1. Pingback: A Coming Tide « Development Technobabble

  2. Pingback: tide.Northwind.Connection « Development Technobabble

  3. Pingback: tide.Northwind.Customers – Part 1 « Development Technobabble

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s