воскресенье, 28 июля 2013 г.

Protect Windows Store Application using Unlock Key with Activation licensing schema

Version 8.0 of the Manco .NET Licensing System supports license protection of the .NET Windows Store Applications. It provides separate protection library which can be used with this kind of applications.

I suppose that you have read section “Online product activation” in our product documentation already. So I describe only things are specific for the Windows Store Application in this article.

First of all you should keep in mind that Windows Store Application has not access to the traditional protected storage locations are used by our system in .NET Framework applications: Windows Registry and IsolatedStorage. So protection library uses another approach in this case. To make it possible for License Manager to clear protected storage you should inform it that this is Windows Store Application:


Next, you should use special edition of the protection library designed for the Windows Store Applications. You can find it here: in the InstallationPath/DLL/WinStore/Manco.Licensing.dll where InstallationPath depends on your OS:
  1. For 32-bits OS it is “C:\Program Files\Manco Software\Manco .NET Licensing System”.
  2. For 64-bits OS it is “C:\Program Files (x86)\Manco Software\Manco .NET Licensing System”.

The next difference is the asynchronous nature of the Windows Store Application. To call Activation Web Service you should use asynchronous calls provided with AwsHelper class. For example, to activate license you can use following method:


C#

private async void ActivateLicense(object sender, RoutedEventArgs e)
{
       // If "Unlock Key" has been entered
       if (this.UnlockKey.Trim() != string.Empty)
       {
             string message = null;

             // Pass "Unlock Key" to the license object
             this.license.UnlockKey = this.UnlockKey.Trim();

             AwsHelper helper = new AwsHelper(
                    this.license,
                    MainPage.ActivationServiceUrl);

             try
             {
                    string activationKey = await helper.ActivateProductGetKeyAsync(false);

                    if (!string.IsNullOrEmpty(activationKey))
                    {
                           // AWS has been called
                           m_bAWSCalled = true;
                           txtActivationKey.Text = activationKey;
                           await MainPage.ShowMessage(
                                  "Activation Key has been succesfully"
                                  + " generated and passed to the text box."
                                  + " Click OK to continue.");
                    }
             }
             catch (Exception exc)
             {
                    message = MainPage.ProcessException(exc);
             }

             if (!string.IsNullOrEmpty(message))
             {
                    await MainPage.ShowMessage(message);
             }
       }
       else
       {
             await MainPage.ShowMessage("Enter Unlock Key to be able activate product");
       }
}

VB.NET
Private Async Sub ActivateLicense(sender As Object, e As RoutedEventArgs)
       ' If "Unlock Key" has been entered
       If Me.UnlockKey.Trim() <> String.Empty Then
             Dim message As String = Nothing

             ' Pass "Unlock Key" to the license object
             Me.license.UnlockKey = Me.UnlockKey.Trim()

             Dim helper As AwsHelper = New AwsHelper( _
                      Me.license, _
                      MainPage.ActivationServiceUrl)

             Try
                    Dim activationKey As String = Await helper.ActivateProductGetKeyAsync(False)

                    If Not String.IsNullOrEmpty(activationKey) Then
                           ' AWS has been called
                           m_bAWSCalled = True
                           txtActivationKey.Text = activationKey
                           Await MainPage.ShowMessage( _
                                  "Activation Key has been succesfully" _
                                  & " generated and passed to the text box." _
                                  & " Click OK to continue.")
                    End If
             Catch exc As Exception
                    message = MainPage.ProcessException(exc)
             End Try

             If Not String.IsNullOrEmpty(message) Then
                    Await MainPage.ShowMessage(message)
             End If
       Else
             Await MainPage.ShowMessage("Enter Unlock Key to be able activate product")
       End If
End Sub


You can find sample solution which demonstrates protection of the Windows 8 Store Application on our official site at http://www.mancosoftware.com/licensing/download.htm


 

среда, 3 июля 2013 г.

Version 2.0 of the Manco Shapefile Editor has been released

Manco Shapefile Editor version 2.0 is available now. You can get 30-days trial version at the http://www.mancosoftware.com/ShapeFileEditor/download.htm

List of the most significant changes made in the new version:

  1. KML export/import.
  2. Mixed layers. Layers with the mixed shape types (e.g. Points, lines, polygons in the same layer). Mixed layers can be split. And also can be saved not only as a KML but also as a Shape file by auto-splitting.
  3. Creating, editing and saving of the complex shapes.
  4. Opening background pictures in given coordinates.
  5. Creating shape layers from the background layers in given coordinates.
  6. Shape rotation.
  7. Shape resize.
  8. Functional toolbar.
  9. Rulers.