Improved Ab2d.ReaderSvg, Ab2d.ReaderWmf and ZoomPanel available

by abenedik 10. October 2011 14:23

The major improvement in this release is made in the licensing code for commercial versions of the products.

The update contains also some minor improvements in the Ab2d.ReaderSvg and Ab2d.ReaderWmf libraries and a small improvement in ViewerSvg. But let me first tell you about the changes in the commercial licensing code.

Recently a customer reported very long delays (up to 10s) when creating an instance of ZoomPanel class. After some investigation I have discovered that the delay is related to a "bug" in Microsoft's RSACryptoServiceProvider class (see http://support.microsoft.com/kb/948080). The RSACryptoServiceProvider is used to validate the license and under some circumstances the VerifyData method on the class can cause a long delay. The licensing code has been changed to prevent the delay. The problem with this bug is that the licensing code can work very well on computers where you test your products, but on some client's computer the RSACryptoServiceProvider can cause your application or product to start with a long delay.

Therefore it is highly recommended to update the products to the latest version.

But this was not the only improvement in the licensing code. Now it is possible to set the new EmbeddedLicenseAssembly property to make the check of the embedded license even faster. To understand the purpose of the new property let me first shortly describe how the licensing code works.

The licensing code in our components uses the standard .Net licensing system. This means that at compile time the compiler calls the licensing code in our products. There the developer license key is read. It is converted into a runtime license key and saved by the compiler into assemblies embedded resource. When our component is used in your application, its licensing code first tries to find the embedded runtime license key. Because our component does not know which assembly contains the embedded license key, it is usually needed to check resources in multiple assemblies before the correct one is found. To make this check much faster, it is now possible to set the static EmbeddedLicenseAssembly property to the assembly that contains the embedded license. This way the licensing code can immediately find the license key and can therefore execute much faster.

The following example sets the EmbeddedLicenseAssembly for the ZoomPanel control:

public class MyClass()
{
    public MyClass()
    {
        Ab2d.Licensing.ZoomPanel.LicenseHelper.EmbeddedLicenseAssembly
          = typeof(MyClass).Assembly;

        InitializeComponent();
    }
}

Samples for other products and some additional details about this process can be found in the new "Using commercial version" help file.

 

The improved licensing code is currently available for Ab2d.ReaderSvg, Ab2d.ReaderWmf and ZoomPanel. The fix for Ab3d.Reader3ds and Ab3d.PowerToys will be available in the following days (both libraries will have many new features that have to be finished before publishing).

 

As mentioned before, this update also brings some additional improvements to Ab2d.ReaderSvg and Ab2d.ReaderWmf.

ReaderSvg and ViewerSvg:

  • Added NameFormatString property to BaseXamlWriterSettings - it can be used to customize how the object names are written to xaml (custom prefixes and suffixes can be added to names). The export window in the ViewerSvg have two new TextBoxes that can be used to specify custom prefix and suffix that will be used to format the object names.
  • Improved reading svg image elements with added support for preserveAspectRatio property.

 

ReaderWmf:

  • Improved drawing Paths - in some cases only path stroke should be drawn without using any fill.
  • Added support for monochrome brushes.

Tags:

ReaderSvg | ReaderWmf | ZoomPanel