diff --git a/KeyManager.Library.KeyStore.NXP_SAM.UI/KeyManager.Library.KeyStore.NXP_SAM.UI.csproj b/KeyManager.Library.KeyStore.NXP_SAM.UI/KeyManager.Library.KeyStore.NXP_SAM.UI.csproj
index 1ba9a59..bdfe150 100644
--- a/KeyManager.Library.KeyStore.NXP_SAM.UI/KeyManager.Library.KeyStore.NXP_SAM.UI.csproj
+++ b/KeyManager.Library.KeyStore.NXP_SAM.UI/KeyManager.Library.KeyStore.NXP_SAM.UI.csproj
@@ -10,7 +10,7 @@
-
+
runtime
diff --git a/KeyManager.Library.UI/KeyManager.Library.UI.csproj b/KeyManager.Library.UI/KeyManager.Library.UI.csproj
index ae66bfc..eb9a2f9 100644
--- a/KeyManager.Library.UI/KeyManager.Library.UI.csproj
+++ b/KeyManager.Library.UI/KeyManager.Library.UI.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/KeyManager/EditKeyStoreControl.xaml.cs b/KeyManager/EditKeyStoreControl.xaml.cs
index 70e8ecb..9f456a9 100644
--- a/KeyManager/EditKeyStoreControl.xaml.cs
+++ b/KeyManager/EditKeyStoreControl.xaml.cs
@@ -3,6 +3,7 @@
using Leosac.KeyManager.Library.KeyStore;
using Leosac.KeyManager.Library.UI;
using Leosac.KeyManager.Library.UI.Domain;
+using Leosac.WpfApp;
using MaterialDesignThemes.Wpf;
using System;
using System.Collections.Generic;
@@ -80,7 +81,15 @@ private void btnPublish_Click(object sender, RoutedEventArgs e)
{
if (DataContext is EditKeyStoreControlViewModel model)
{
- model.Publish();
+ var plan = MaintenancePlan.GetSingletonInstance();
+ if (!string.IsNullOrEmpty(plan.LicenseKey))
+ {
+ model.Publish();
+ }
+ else
+ {
+ MaintenancePlan.OpenRegistration();
+ }
}
}
}
diff --git a/KeyManager/KeyManager.csproj b/KeyManager/KeyManager.csproj
index 246bab0..1105930 100644
--- a/KeyManager/KeyManager.csproj
+++ b/KeyManager/KeyManager.csproj
@@ -25,7 +25,7 @@
-
+