Dashboard .NET Plugin Support

Sample Date.Net Plugin Source Code

SnoopSoft Dashboard version 3.2 now supports Microsoft .NETCF applications and can host them directly within Dashboard on the Today page of your device!

The simplicity and rich content of .NET is now finally available to anyone who wants to put it on the Today page of a Windows Mobile Pocket PC device.

Source code for a fully functional plugin is located at the top of this page. Download it now and open up the world of .NET to your Today page (within Dashboard). Use the trial version of Dashboard to test out your .NET application. In addition to the standard Today page integration, hosting these applications within Dashboard opens up the full functionality of Dashboard to your .NET application. For instance, SnoopSoft Dashboard allows the following functionality beyond what the basic Today page offers such as the ability to display different data on different 'views' of Dashboard. For instance, a weather plugin that shows the local weather on the main Dashboard view and a secondary city on another Dashboard view!

Caveats

Even though your application is running on the Today page, it is still a .NET application. The full .NETCF runtime must be installed on any system that uses your application as a Today module.

Also, since the .NET runtime is slower than native code when starting, your users must expect some delays when the device restarts. This is because the .NET runtime is being activated for your application so that it can be displayed. These slowdowns are not apparent with a native plugin.

While the integration works well, there are times when users will see your application background displayed before a paint or a double painting may occur. We've tried to limit these and overall it works well but it is not perfect.

How does it work?

We have worked hard to keep the basic Today plugin interactions as similar as a native C++ plugin and all the behind the scenes work is already done for you. All you have to do is gather your information and paint it on the screen.

Within the sample application all the code is fully commented so we'll cover only the highlights here.

What makes this different than an application?
You need to consider that more than one plugin can reside on the today page at a time and limit the height of your plugin to what is absolutely necessary.

One way to do this is give the user control over the height of your plugin. Dashboard has a unique ability to allow your plugin to take up however much room is available on the screen. Within Dashboard, our plugins allow the user to specify a 0 (zero) height, and in doing so we convert that internally to a flexible height plugin that will always take as much space on screen as is available. This does not make sense for all plugins so let the user decide and don't abuse this setting. To make your plugin flexible in height, return to Dashboard the MAX_HEIGHT constant.

One thing to note is that Dashboard will not draw any plugin on the screen that is either too big for the screen, or in combination with the other plugins already on the screen, it won't fit. If your plugin is not being drawn within Dashboard it is possible that it is too big and you need to move to a flexible height or reconsider your height. With the advent of portrait and landscape this can happen in one aspect but not the other.

TodayMsgWnd
The TodayMsgWnd is a MessageWindow that handles all the interaction with Dashboard. Of note are the following properties that you should be using in your application:

IsInitialized - (READ-ONLY) Has Dashboard made the call in to initialize this window and taken ownership of it.

IsSelected - (READ-ONLY) Is this application selected inside the Today page? Handled internally but Read-Only access is provided so you can properly handle selectability.

Height - You can set the Height of your window through this property.

CurrentView - (READ-ONLY) Determines which Dashboard view is being shown.

FontSize - (READ-ONLY) Font size for the Today page (from the Settings).

ColorText - (READ-ONLY) Color of the Today Text.

ColorHighlight - (READ-ONLY) Color of the window Background when selected.

ColorHighlightText - (READ-ONLY) Color of the Text when selected.

Polling
The Today page works on a polling architecture. At a regular interval, Dashboard will poll your application with the WM_TODAYCUSTOM_QUERYREFRESHCACHE message and it will expect the height of the application to be returned. This is all handled internally for you in the TodayMsgWnd class so as long as you set the Height property and keep it updated, your application will be shown with the right height.

Changing your application height is not instantaneous. Set the height in the TodayMsgWnd and then let it pass it back to Dashboard when requested. Dashboard will adjust the height of your application when it repaints. Don't try to circumvent the process.

OnPaint
Your form's OnPaint routine is really the only thing that you have to code for this to work. A call at the start of painting to Dashboard will get the Today background painted on your form and then you can draw whatever you want on top of that.

Controls seem to work - though I have not tested them extensively. Most Today plugins don't use a lot of controls (if any) and paint directly to the display. By using .NET though you have the opportunity to place controls onto the Today page which can make for some interesting modules.

Configuring

The following settings will need to be put into the Registry so Dashboard can 'see' the program.

Create a new key for your application in the following location:
HKEY_CURRENT_USER/Software/SnoopSoft/Dashboard3/NetCfApps

For example, the sample's name would be 'Date' so we would end up with the following after creating the key:
HKEY_CURRENT_USER/Software/SnoopSoft/Dashboard3/NetCfApps/Date

Then under that key, add the following STRING value and put the fully qualified location of your application as the data:
EXE
\Program Files\DatePlugin\DatePlugin.exe

Pricing

Dashboard is not free so pricing options need to be covered.

In the past when we allowed for separate modules to be incorporated within Dashboard, most developers merely required that Dashboard be purchased separately and they sold their modules independently of the Dashboard product. This model will still work with most independent developers and we plan to offer a version of Dashboard that comes without any built-in modules at all so people can purchase only what they need.

If you are a corporate developer and are looking to implement a .NET today module for your enterprise the cost of Dashboard could become prohibitive. Therefore, please contact us at: newrelease at snoopsoft dot com and we can work through a site licensing agreement for the software that works for both your company and ours.

We are also open to discussions around bundling Dashboard with your plugin for sale as a single unit of purchase. Please contact us at newrelease at snoopsoft dot com if you would like to discuss this option further.

SnoopSoft is a private company with more ideas than we have time to develop. If you are interested in investment opportunities or buyout discussions then we are open to having those discussions with you. Please get in contact with us at: newrelease at snoopsoft dot com