NAVmoble - the pocket-sized ERP
Optimized for Microsoft Dynamics NAV and Windows Mobile powered devices

Sunday, July 30, 2006

Sandcastle CTP is out/NDoc is dead!

Microsoft released July 2006 CTP of their Documentation Compilers For Managed Class Libraries. It is much like the NDoc Open Source Project

Sandcastle produces accurate, MSDN style, comprehensive documentation by reflecting over the source assemblies and optionally integrating XML Documentation Comments.

Sandcastle has the following key features:
  • Works with or without authored comments

  • Supports Generics and .NET Framework 2.0

  • Sandcastle has 2 main components (MrefBuilder and Build Assembler)

  • MrefBuilder generates reflection xml file for Build Assembler

  • Build Assembler includes syntax generation, transformation..etc

  • Sandcastle is used internally to build .Net Framework documentation

  • Sandcastle should provide support for XAML as well.

Recently Kevin Downs (the leader of NDoc) sent a mail to the NDoc community saying that NDoc is dead!. That was a cool project that I've used many times and never gave a donation at all! We all should reconsider our community involvement!

Get more details about Sandcastle and NDoc's death here at the Scott Hanselman's blog and The Sandcastle blog

Pictures from MS Dev Days 2006 Bulgaria

Martin has few pictures from Microsoft Dev Days 2006, published on his blog.

Thursday, July 27, 2006

Atlas to be released in .NET Framework 3.5

A guy named Alian said in his blog that hopefully Atlas will be released till the end of the year and will be released as a part of .NET Framework 3.5 (codename "Orcas"). Does it mean that we will have . NET Framework 3.5 after few months?
Hey, I've just started loosing with all these .NET framework releases

LLBLGen 2.0 - Implementing Entity Factory Mapper

We've just finished upgrading our current project to LLBLGen v2.0. It provides a lot new features including some .NET 2.0. goodies. One of these new stunning features is the support for generic entity collections. Our project involves development of ASP.NET based application framework, which needs to construct and fetch entity collection run-time (Adapter scenario).

The common pattern for doing this with LLBLGen 2.0 in the Adapter scenario is like this:

EntityCollection<CustomerEntity> customers = new EntityCollection<CustomerEntity>(new CustomerEntityFactory());
DataAccessAdapter adapter = new DataAccessAdapter();

We've got a class called DataAccessManager, which is intended to be used like this:
EnityCollection<CustomerEntity> customers = DataAccessManager.FetchEntityCollection<CustomerEntity>(null);

...and the implementation(simplified version):

   public static class DataAccessManager
         public static EntityCollection FetchEntityCollection(IPredicateExpression expression) where T : EntityBase2
            EntityCollection collection = new EntityCollection();
            Type factoryType = EntityFactoryMapper.GetFactoryType(typeof(T));
            IEntityFactory2 factory = (IEntityFactory2)Activator.CreateInstance(factoryType);
            collection.EntityFactoryToUse = factory;
            DataAccessAdapter adapter = new DataAccessAdapter(connectionString);
            return collection;

The problem in the upper implementation is that we haven't found "out of the box" mechanism to map EntityBase2 type to IEntityFactory implementation. So we've managed to generate such a class by adding a new LLBLGen template.

We wanted to have our mappign pattern like this:
Type t = typeof(CustomerEntity);
IEntityFactory2 entityFactoryType = EntityFactoryMapper.GetFactoryType(t);

and the implemenation like this(not quite elegant solution):

   public class EntityFactoryMapper
      public static Type GetFactoryType(Type entityType)
         if(entityType == typeof(CustomerEntity))
            return typeof(CustomerEntityFactory);
            if(entityType == typeof(OrderEntity))
               return typeof(OrderEntityFactory);

In order to this we've created a new template file:
[DEVICE]:\Program Files\Solutions Design\LLBLGen Pro v2.0\Templates\SharedTemplates\Net2.x\C#\FactoryMapper.template

and we've added the following lines :
using System;
namespace <[RootNamespace]>


//Entity-Type To EntityFactory Type mapper

using YourProjectNamespace.EntityClasses;
using YourProjectNamespace.FactoryClasses;

   public class EntityFactoryMapper
      public static Type GetFactoryType(Type entityType)
         <[Foreach Entity CrLf]>
         if(entityType == typeof(<[CurrentEntityName]>Entity))
            return typeof(<[CurrentEntityName]>EntityFactory);
               return null;

After generating the code again we've received our new class EntityFactoryMapper ready for usage

Monday, July 24, 2006

Microsoft published Device Emulator source

The V1 Device Emulator source code is released by Microsoft under a shared-source initiative.
You can compile the emulator yourself, using Visual Studio 2005, and either run it as a standalone Windows application, or use its COM self-registration code to make it the default DeviceEmulator on your PC (meaning launch it and use it from Visual Studio 2005 and the Device Emulator Manager). The Shared Source release does not include sources to the Device Emulator Manager application or to the ActiveSync-over-DMA code, both of which are present in binary form in the V1 release.

Download link

Wednesday, July 05, 2006

Windows Mobile Tweaks

Following a list of registry based tweaks for Windows Mobile
Disable menu animations
To disable menu animations (sliding in&out) and speed up
performance of the UI a bit:

HKLM|SYSTEM|GWE|Menu|AniType = 0

To change it back to the default:

HKLM|SYSTEM|GWE|Menu|AniType = 6

Disable window animations
To disable window animations (minimizing/maximizing)
and speed up performance of the UI a bit:


And to switch them back on:


Add a 'Disconnect' button (and Timer) to the
Connection List for GPRS

To add a Disconnect button:

HKLM|ControlPanel|Phone|Flags2 = 8

To add a Disconnect button and a timer display showing
how long GRPS is in use for the session:

HKLM|ControlPanel|Phone|Flags2 = 16

To disable both the Disconnect button and the timer :

HKLM|ControlPanel|Phone|Flags2 = 0

Default SMS Delivery Notifications to on
To always have SMS Delivery Notifications enabled:

HKCU|Software|Microsoft|Inbox|Settings|SMSDeliveryNotify = 1

To disable them (can still enable per-SMS in SMS settings):

HKCU|Software|Microsoft|Inbox|Settings|SMSDeliveryNotify = 0

Note that SMS Delivery Notifications
are a network provider option,
and the recipient may refuse them to be sent out

Make reminders show only once
By default, reminders will keep bugging you for 2 minutes.
You can change this to zero minutes by adjusting this value:

HKCU|ControlPanel|Notifications|Reminders|AutoSnooze|AutoSnoozeMins = 0

Note that you can set this to any value you like.
Alternative to setting this value to zero is to delete the
'AutoSnooze' key altogether

Disable the SMS Sent notification
If you're tired of the "Message Sent" notification after sending
an SMS text message, you can disable them:

HKLM|Software|Microsoft|Inbox|Settings|SMSNoSentMsg = 1

And to re-enable:

HKLM|Software|Microsoft|Inbox|Settings|SMSNoSentMsg = 0

Please note that the 'Settings'
key may not exist in your device, and thus may have to be created first.

Change the SMS Sent notification text
If you just want the "Message Sent" notification to read
something different, adjust the following:

HKLM|Software|Microsoft|Inbox|Svc|SMS|MessageSent = "Message Sent"

See the full list here

Tuesday, July 04, 2006

Eric Rudder in Sofia

I just came from 2 meetings held today in the local Microsoft office. The purpose of the meetings was Eric Rudder(Microsoft Senior Vice President for the Developer Platform Evangelism Division) to meet with the local ISVs( in the first meeting)and with the local .NET User Group members(in the later one).
The atmosphere was informal and it was more like Q&A session. The second session (with the .NET User Group members) was more technical and it was really cool. I really enjoyed it! We had a little after party with a lot of technical P2P discussions.
The Q&As was mostly about the WCF. There was also a Bulgarian guy(George Kremenliev) from the WCF testing team, who gave us some additional interesting bits. I hope he will be able to make a session in front of the .NET User Group, soon.
Eric talked about the future of the MS technologies and answered tons of technical questions about the various TREE LETTER ACRONYMS and I think most of the guys there were excited to meet him.

Shortcuts – My Windows Vista Sidebar Gadget

I read a tutorial about building Windows Vista Sidebar Gadget and decided to try it myself. So this will be my first (and hopefully not the last) Windows Vista Sidebar Gadget – a gadget to display some usefull shortcuts.

The first problem I faced is the need to have a better knowledge on javascript. Fortunately, lately I ‘m working on a projects based on Atlas , so I ‘ve learned some basic javascript stuff. It would be even better if the Sidebar API was based on the Atlas client-side API – this is where I’ve invested a couple months digging into…Anyway, the second problem for me is the visual appearance of my gadget – I can’t do the design stuff, but anyway I’ve made some quick images with Paint.So here are the features in short:

  • display a list of clickable shortcuts
  • clicking over a shortcut, triggers execution of some shell command
  • support for adding new shortcuts.
  • support for deleting shortcuts

In general writing a gadget is similar to writing a web site with client-side scripting only – it contains HTML , CSS, JS, media, etc. So that’s how it looks like in the gadgets gallery:

After installing the gadget , it displays some default shortcuts

Only the last shortcut may be deleted – that is not quite user friendly , but it was easier for me :-)

Clicking on settings of the gadget provides dialog to add a new shortcut. The user may clear all shortcuts as well.

The gadget code may be downloaded from here. It is not completed in anyway and has some bugs as well. The zip file contains installation instructions.

There is a lot of room for improvements… but no time at all

Monday, July 03, 2006

The real value of the SecureString

I found recently an interesting blog dedicated mostly to security issues authored by a Security Development MVP named Valery.

Among the other intriguing posts, I found this post discussing the real value of the SecureString class

Sunday, July 02, 2006

SQL Server 2005 Everywhere CTP is available

The Sql Server 2005 Everywhere Edition CTP is available for download
Microsoft SQL Server 2005 Everywhere Edition offers essential relational database functionality in a compact footprint ideal for embedding in mobile and desktop applications including a new generation of occasionally connected dynamic applications.
Read more here
Download link

Unable to install Visual Stidio 2005 on Windows Vista Beta 2

I just tried to install VS2005 on my Vista Beta 2 box and received an error message saying that the setup process was terminated.

Few minutes googling and the solution was there: I just had to install msxml6 before proceeding with the VS2005 installation. And that may be done by launching the msxml6 installer from:


Then I launched VS2005 installer again and everything was just fine.