diff --git a/XenAdmin/Alerts/Types/MessageAlert.cs b/XenAdmin/Alerts/Types/MessageAlert.cs
index 369f4b55f..9f2a3262e 100644
--- a/XenAdmin/Alerts/Types/MessageAlert.cs
+++ b/XenAdmin/Alerts/Types/MessageAlert.cs
@@ -348,7 +348,7 @@ namespace XenAdmin.Alerts
case XenAPI.Message.MessageType.LICENSE_EXPIRES_SOON:
case XenAPI.Message.MessageType.LICENSE_DOES_NOT_SUPPORT_POOLING:
- return () => Program.OpenURL(XenAdmin.Core.Registry.LinkLabelHidden ? null : InvisibleMessages.LICENSE_EXPIRY_WEBPAGE);
+ return () => Program.OpenURL(HiddenFeatures.LinkLabelHidden ? null : InvisibleMessages.LICENSE_EXPIRY_WEBPAGE);
case XenAPI.Message.MessageType.VBD_QOS_FAILED:
case XenAPI.Message.MessageType.VCPU_QOS_FAILED:
case XenAPI.Message.MessageType.VIF_QOS_FAILED:
diff --git a/XenAdmin/Commands/AddHostToPoolCommand.cs b/XenAdmin/Commands/AddHostToPoolCommand.cs
index 5e6ee31ec..f559ec70f 100644
--- a/XenAdmin/Commands/AddHostToPoolCommand.cs
+++ b/XenAdmin/Commands/AddHostToPoolCommand.cs
@@ -121,7 +121,7 @@ namespace XenAdmin.Commands
Helpers.FeatureForbidden(host, Host.RestrictCpuMasking) &&
!PoolJoinRules.FreeHostPaidMaster(host, master, false))) // in this case we can upgrade the license and then mask the CPU
{
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_CPUMASKING : Messages.UPSELL_BLURB_CPUMASKING + Messages.UPSELL_BLURB_CPUMASKING_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_CPUMASKING : Messages.UPSELL_BLURB_CPUMASKING + Messages.UPSELL_BLURB_CPUMASKING_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPUMASKING);
dlg.ShowDialog(Parent);
return;
diff --git a/XenAdmin/Commands/CallHomeCommand.cs b/XenAdmin/Commands/CallHomeCommand.cs
index 4dede2172..4266519bc 100644
--- a/XenAdmin/Commands/CallHomeCommand.cs
+++ b/XenAdmin/Commands/CallHomeCommand.cs
@@ -1,34 +1,34 @@
-using System.Linq;
-using XenAdmin.Core;
-using XenAPI;
-
-namespace XenAdmin.Commands
-{
- internal class HealthCheckCommand : Command
- {
- ///
- /// Initializes a new instance of this Command. The parameter-less constructor is required if
- /// this Command is to be attached to a ToolStrip menu item or button. It should not be used in any other scenario.
- ///
- public HealthCheckCommand()
- {
- }
-
- public HealthCheckCommand(IMainWindow mainWindow)
- : base(mainWindow)
- {
- }
-
- protected override void ExecuteCore(SelectedItemCollection selection)
+using System.Linq;
+using XenAdmin.Core;
+using XenAPI;
+
+namespace XenAdmin.Commands
+{
+ internal class HealthCheckCommand : Command
+ {
+ ///
+ /// Initializes a new instance of this Command. The parameter-less constructor is required if
+ /// this Command is to be attached to a ToolStrip menu item or button. It should not be used in any other scenario.
+ ///
+ public HealthCheckCommand()
{
- if (Program.MainWindow.HealthCheckOverviewLauncher != null && !XenAdmin.Core.Registry.HealthCheckHidden)
- Program.MainWindow.HealthCheckOverviewLauncher.LaunchIfRequired(false, selection);
- }
-
- protected override bool CanExecuteCore(SelectedItemCollection selection)
- {
- return ConnectionsManager.XenConnectionsCopy.Any(xenConnection => xenConnection.IsConnected
- && !Helpers.FeatureForbidden(xenConnection, Host.RestrictHealthCheck));
- }
- }
-}
+ }
+
+ public HealthCheckCommand(IMainWindow mainWindow)
+ : base(mainWindow)
+ {
+ }
+
+ protected override void ExecuteCore(SelectedItemCollection selection)
+ {
+ if (Program.MainWindow.HealthCheckOverviewLauncher != null && !HiddenFeatures.HealthCheckHidden)
+ Program.MainWindow.HealthCheckOverviewLauncher.LaunchIfRequired(false, selection);
+ }
+
+ protected override bool CanExecuteCore(SelectedItemCollection selection)
+ {
+ return ConnectionsManager.XenConnectionsCopy.Any(xenConnection => xenConnection.IsConnected
+ && !Helpers.FeatureForbidden(xenConnection, Host.RestrictHealthCheck));
+ }
+ }
+}
diff --git a/XenAdmin/Commands/CrossPoolMigrateCommand.cs b/XenAdmin/Commands/CrossPoolMigrateCommand.cs
index d7dde3db2..692a78b0a 100644
--- a/XenAdmin/Commands/CrossPoolMigrateCommand.cs
+++ b/XenAdmin/Commands/CrossPoolMigrateCommand.cs
@@ -93,7 +93,7 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_CPM: Messages.UPSELL_BLURB_CPM + Messages.UPSELL_BLURB_CPM_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_CPM : Messages.UPSELL_BLURB_CPM + Messages.UPSELL_BLURB_CPM_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPM);
dlg.ShowDialog(parent);
}
diff --git a/XenAdmin/Commands/DRConfigureCommand.cs b/XenAdmin/Commands/DRConfigureCommand.cs
index 06893f58a..466b31de8 100644
--- a/XenAdmin/Commands/DRConfigureCommand.cs
+++ b/XenAdmin/Commands/DRConfigureCommand.cs
@@ -118,7 +118,7 @@ namespace XenAdmin.Commands
private static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
}
diff --git a/XenAdmin/Commands/DRDryrunCommand.cs b/XenAdmin/Commands/DRDryrunCommand.cs
index 422faa8eb..ef48b9317 100644
--- a/XenAdmin/Commands/DRDryrunCommand.cs
+++ b/XenAdmin/Commands/DRDryrunCommand.cs
@@ -94,7 +94,7 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
}
diff --git a/XenAdmin/Commands/DRFailbackCommand.cs b/XenAdmin/Commands/DRFailbackCommand.cs
index b9f119ac4..8717289a8 100644
--- a/XenAdmin/Commands/DRFailbackCommand.cs
+++ b/XenAdmin/Commands/DRFailbackCommand.cs
@@ -97,7 +97,7 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
}
diff --git a/XenAdmin/Commands/DRFailoverCommand.cs b/XenAdmin/Commands/DRFailoverCommand.cs
index 6f28d3092..601e83833 100644
--- a/XenAdmin/Commands/DRFailoverCommand.cs
+++ b/XenAdmin/Commands/DRFailoverCommand.cs
@@ -94,7 +94,7 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
}
diff --git a/XenAdmin/Commands/DisasterRecoveryCommand.cs b/XenAdmin/Commands/DisasterRecoveryCommand.cs
index e06b7ed07..0846ee022 100644
--- a/XenAdmin/Commands/DisasterRecoveryCommand.cs
+++ b/XenAdmin/Commands/DisasterRecoveryCommand.cs
@@ -91,7 +91,7 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
}
diff --git a/XenAdmin/Commands/DisconnectWlbServerCommand.cs b/XenAdmin/Commands/DisconnectWlbServerCommand.cs
index 05dff1660..da57ca4cf 100644
--- a/XenAdmin/Commands/DisconnectWlbServerCommand.cs
+++ b/XenAdmin/Commands/DisconnectWlbServerCommand.cs
@@ -63,7 +63,7 @@ namespace XenAdmin.Commands
if (Helpers.FeatureForbidden(selection[0].XenObject, Host.RestrictWLB))
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_WLB);
dlg.ShowDialog(Parent);
return;
diff --git a/XenAdmin/Commands/HACommand.cs b/XenAdmin/Commands/HACommand.cs
index b153f5a36..473d9354f 100644
--- a/XenAdmin/Commands/HACommand.cs
+++ b/XenAdmin/Commands/HACommand.cs
@@ -82,7 +82,7 @@ namespace XenAdmin.Commands
if (Helpers.FeatureForbidden(pool, Host.RestrictHA))
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_HA : Messages.UPSELL_BLURB_HA + Messages.UPSELL_BLURB_HA_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_HA : Messages.UPSELL_BLURB_HA + Messages.UPSELL_BLURB_HA_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_HA);
dlg.ShowDialog(Parent);
}
diff --git a/XenAdmin/Commands/MigrateVirtualDiskCommand.cs b/XenAdmin/Commands/MigrateVirtualDiskCommand.cs
index ecfffbc03..2904b0c6a 100644
--- a/XenAdmin/Commands/MigrateVirtualDiskCommand.cs
+++ b/XenAdmin/Commands/MigrateVirtualDiskCommand.cs
@@ -85,7 +85,7 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.MIGRATE_VDI_UPSELL_BLURB : Messages.MIGRATE_VDI_UPSELL_BLURB + Messages.MIGRATE_VDI_UPSELL_BLURB_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.MIGRATE_VDI_UPSELL_BLURB : Messages.MIGRATE_VDI_UPSELL_BLURB + Messages.MIGRATE_VDI_UPSELL_BLURB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPM);
dlg.ShowDialog(parent);
}
diff --git a/XenAdmin/Commands/ViewWorkloadReportsCommand.cs b/XenAdmin/Commands/ViewWorkloadReportsCommand.cs
index f56d9d72d..f796afe8c 100644
--- a/XenAdmin/Commands/ViewWorkloadReportsCommand.cs
+++ b/XenAdmin/Commands/ViewWorkloadReportsCommand.cs
@@ -84,7 +84,7 @@ namespace XenAdmin.Commands
if (Helpers.FeatureForbidden(selection[0].XenObject, Host.RestrictWLB))
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_WLB);
dlg.ShowDialog(Parent);
return;
diff --git a/XenAdmin/Controls/DeprecationBanner.cs b/XenAdmin/Controls/DeprecationBanner.cs
index 176b29c86..e8e3b2847 100644
--- a/XenAdmin/Controls/DeprecationBanner.cs
+++ b/XenAdmin/Controls/DeprecationBanner.cs
@@ -57,7 +57,7 @@ namespace XenAdmin.Controls
public DeprecationBanner()
{
InitializeComponent();
- HelperLinkVisible = !XenAdmin.Core.Registry.LinkLabelHidden;
+ HelperLinkVisible = !XenAdmin.Core.HiddenFeatures.LinkLabelHidden;
Visible = false;
helperLink.Click += helperLink_Click;
BackgroundColour = defaultBackgroundColour;
diff --git a/XenAdmin/Controls/UpsellPage.cs b/XenAdmin/Controls/UpsellPage.cs
index 9acadc237..4bc967882 100644
--- a/XenAdmin/Controls/UpsellPage.cs
+++ b/XenAdmin/Controls/UpsellPage.cs
@@ -51,7 +51,7 @@ namespace XenAdmin.Controls
public UpsellPage()
{
InitializeComponent();
- this.LearnMoreButton.Visible = !XenAdmin.Core.Registry.LearnMoreButtonHidden;
+ this.LearnMoreButton.Visible = !HiddenFeatures.LearnMoreButtonHidden;
}
public void enableOkButton()
diff --git a/XenAdmin/Core/HiddenFeatures.cs b/XenAdmin/Core/HiddenFeatures.cs
new file mode 100644
index 000000000..9c54d463e
--- /dev/null
+++ b/XenAdmin/Core/HiddenFeatures.cs
@@ -0,0 +1,89 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XenAdmin.Core
+{
+ public class HiddenFeatures
+ {
+ internal static bool CPSOptimizationHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(CPS_OPTIMIZATION_HIDDEN); }
+ }
+
+ internal static bool RDPPollingHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(RDP_POLLING_HIDDEN); }
+ }
+
+ internal static bool LearnMoreButtonHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(LEARN_MORE_HIDDEN); }
+ }
+
+ internal static bool LinkLabelHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(LINK_LABEL_HIDDEN); }
+ }
+
+ internal static bool ToolStripMenuItemHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(TOOL_STRIP_MENU_ITEM_HIDDEN); }
+ }
+
+ internal static bool CrossServerPrivateNetworkHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(CROSS_SERVER_PRIVATE_NETWORK_HIDDEN); }
+ }
+
+ internal static bool CopyrightHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(COPYRIGHT_HIDDEN); }
+ }
+
+ internal static bool HealthCheckHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(HEALTH_CHECK_HIDDEN); }
+ }
+
+ internal static bool UploadOptionHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(UPLOAD_OPTION_HIDDEN); }
+ }
+
+ internal static bool LicenseNagHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(LICENSE_NAG_HIDDEN); }
+ }
+
+ internal static bool LicenseOperationsHidden
+ {
+ get
+ { return Registry.HiddenFeatures != null && Registry.HiddenFeatures.Contains(LICENSE_OPERATIONS_HIDDEN); }
+ }
+
+ private const string CPS_OPTIMIZATION_HIDDEN = "cps_optimization";
+ private const string RDP_POLLING_HIDDEN = "rdp_polling";
+ private const string LEARN_MORE_HIDDEN = "learn_more";
+ private const string LINK_LABEL_HIDDEN = "link_label";
+ private const string TOOL_STRIP_MENU_ITEM_HIDDEN = "tool_strip_menu_item";
+ private const string CROSS_SERVER_PRIVATE_NETWORK_HIDDEN = "cross_server_private_network";
+ private const string COPYRIGHT_HIDDEN = "copyright";
+ private const string HEALTH_CHECK_HIDDEN = "health_check";
+ private const string UPLOAD_OPTION_HIDDEN = "upload_option";
+ private const string LICENSE_NAG_HIDDEN = "license_nag";
+ private const string LICENSE_OPERATIONS_HIDDEN = "license_operations";
+ }
+}
diff --git a/XenAdmin/Core/Registry.cs b/XenAdmin/Core/Registry.cs
index 459f8c294..61c94cdc2 100644
--- a/XenAdmin/Core/Registry.cs
+++ b/XenAdmin/Core/Registry.cs
@@ -271,7 +271,7 @@ namespace XenAdmin.Core
}
///
- /// Reads a key from XENCENTER_LOCAL_KEYS\k.
+ /// Reads a key from HKEY_LOCAL_MACHINE\XENCENTER_LOCAL_KEYS\k.
///
private static string ReadKey(string k)
{
@@ -299,6 +299,46 @@ namespace XenAdmin.Core
}
}
+ ///
+ /// Reads a key from hKey\XENCENTER_LOCAL_KEYS\k, targeting the 32-bit registry view
+ ///
+ private static string ReadKey(string k, RegistryHive hKey)
+ {
+ try
+ {
+ RegistryKey masterKey = RegistryKey.OpenBaseKey(hKey, RegistryView.Registry32);
+ masterKey = masterKey.OpenSubKey(XENCENTER_LOCAL_KEYS) ?? null;
+
+ if (masterKey == null)
+ return null;
+
+ try
+ {
+ var v = masterKey.GetValue(k);
+ return (v != null) ? v.ToString() : null;
+ }
+ finally
+ {
+ masterKey.Close();
+ }
+ }
+ catch (Exception e)
+ {
+ log.DebugFormat(@"Failed to read {0}\{1} from registry; assuming NULL.", XENCENTER_LOCAL_KEYS, k);
+ log.Debug(e, e);
+ return null;
+ }
+ }
+
+ ///
+ /// Reads a key from XENCENTER_LOCAL_KEYS\k, trying CurrentUser first and then LocalMachine
+ ///
+ private static string ReadInstalledKey(string k)
+ {
+ var v = ReadKey(k, RegistryHive.CurrentUser);
+ return (v != null) ? v : ReadKey(k, RegistryHive.LocalMachine);
+ }
+
public static string HealthCheckIdentityTokenDomainName
{
get { return ReadKey(HEALTH_CHECK_IDENTITY_TOKEN_DOMAIN_NAME); }
@@ -331,73 +371,7 @@ namespace XenAdmin.Core
public static string HiddenFeatures
{
- get { return ReadKey(HIDDEN_FEATURES); }
- }
-
- internal static bool CPSOptimizationHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(CPS_OPTIMIZATION_HIDDEN); }
- }
-
- internal static bool RDPPollingHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(RDP_POLLING_HIDDEN); }
- }
-
- internal static bool LearnMoreButtonHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(LEARN_MORE_HIDDEN); }
- }
-
- internal static bool LinkLabelHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(LINK_LABEL_HIDDEN); }
- }
-
- internal static bool ToolStripMenuItemHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(TOOL_STRIP_MENU_ITEM_HIDDEN); }
- }
-
- internal static bool CrossServerPrivateNetworkHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(CROSS_SERVER_PRIVATE_NETWORK_HIDDEN); }
- }
-
- internal static bool CopyrightHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(COPYRIGHT_HIDDEN); }
- }
-
- internal static bool HealthCheckHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(HEALTH_CHECK_HIDDEN); }
- }
-
- internal static bool UploadOptionHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(UPLOAD_OPTION_HIDDEN); }
- }
-
- internal static bool LicenseNagHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(LICENSE_NAG_HIDDEN); }
- }
-
- internal static bool LicenseOperationsHidden
- {
- get
- { return HiddenFeatures != null && HiddenFeatures.Contains(LICENSE_OPERATIONS_HIDDEN); }
+ get { return ReadInstalledKey(HIDDEN_FEATURES); }
}
private const string SSL_CERTIFICATES_CHANGED_ONLY = "CHANGED";
@@ -422,17 +396,6 @@ namespace XenAdmin.Core
private const string HEALTH_CHECK_DIAGNOSTIC_DOMAIN_NAME = "HealthCheckDiagnosticDomainName";
private const string HEALTH_CHECK_PRODUCT_KEY = "HealthCheckProductKey";
private const string HIDDEN_FEATURES = "HiddenFeatures";
- private const string CPS_OPTIMIZATION_HIDDEN = "cps_optimization";
- private const string RDP_POLLING_HIDDEN = "rdp_polling";
- private const string LEARN_MORE_HIDDEN = "learn_more";
- private const string LINK_LABEL_HIDDEN = "link_label";
- private const string TOOL_STRIP_MENU_ITEM_HIDDEN = "tool_strip_menu_item";
- private const string CROSS_SERVER_PRIVATE_NETWORK_HIDDEN = "cross_server_private_network";
- private const string COPYRIGHT_HIDDEN = "copyright";
- private const string HEALTH_CHECK_HIDDEN = "health_check";
- private const string UPLOAD_OPTION_HIDDEN = "upload_option";
- private const string LICENSE_NAG_HIDDEN = "license_nag";
- private const string LICENSE_OPERATIONS_HIDDEN = "license_operations";
}
public enum SSLCertificateTypes { None, Changed, All }
diff --git a/XenAdmin/Core/VMGroup.cs b/XenAdmin/Core/VMGroup.cs
index 7e20ac4c1..67d81d754 100644
--- a/XenAdmin/Core/VMGroup.cs
+++ b/XenAdmin/Core/VMGroup.cs
@@ -141,7 +141,7 @@ namespace XenAdmin.Core
{
get
{
- if (XenAdmin.Core.Registry.LinkLabelHidden)
+ if (HiddenFeatures.LinkLabelHidden)
return typeof(T) == typeof(VMPP) ? Messages.UPSELL_BLURB_VM_PROTECTION : Messages.UPSELL_BLURB_VM_APPLIANCES;
else
return typeof(T) == typeof(VMPP) ? Messages.UPSELL_BLURB_VM_PROTECTION + Messages.UPSELL_BLURB_VM_PROTECTION_MORE : Messages.UPSELL_BLURB_VM_APPLIANCES + Messages.UPSELL_BLURB_VM_APPLIANCES_MORE;
diff --git a/XenAdmin/Diagnostics/Problems/ConnectionProblem/VmprActivatedWarning.cs b/XenAdmin/Diagnostics/Problems/ConnectionProblem/VmprActivatedWarning.cs
index c37a1ac85..b69fbb371 100644
--- a/XenAdmin/Diagnostics/Problems/ConnectionProblem/VmprActivatedWarning.cs
+++ b/XenAdmin/Diagnostics/Problems/ConnectionProblem/VmprActivatedWarning.cs
@@ -56,7 +56,7 @@ namespace XenAdmin.Diagnostics.Problems.ConnectionProblem
public override Uri UriToLaunch
{
get {
- return XenAdmin.Core.Registry.LinkLabelHidden ? null : new Uri(InvisibleMessages.VMPR_DEPRECATION_URL);
+ return XenAdmin.Core.HiddenFeatures.LinkLabelHidden ? null : new Uri(InvisibleMessages.VMPR_DEPRECATION_URL);
}
}
}
diff --git a/XenAdmin/Diagnostics/Problems/HostProblem/HostHasWssWarning.cs b/XenAdmin/Diagnostics/Problems/HostProblem/HostHasWssWarning.cs
index df075cfc3..d4259730a 100644
--- a/XenAdmin/Diagnostics/Problems/HostProblem/HostHasWssWarning.cs
+++ b/XenAdmin/Diagnostics/Problems/HostProblem/HostHasWssWarning.cs
@@ -57,7 +57,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
public override Uri UriToLaunch
{
get {
- return XenAdmin.Core.Registry.LinkLabelHidden ? null : new Uri(InvisibleMessages.WSS_DEPRECATION_URL);
+ return XenAdmin.Core.HiddenFeatures.LinkLabelHidden ? null : new Uri(InvisibleMessages.WSS_DEPRECATION_URL);
}
}
}
diff --git a/XenAdmin/Diagnostics/Problems/SRProblem/UnsupportedStorageLinkSrIsPresentProblem.cs b/XenAdmin/Diagnostics/Problems/SRProblem/UnsupportedStorageLinkSrIsPresentProblem.cs
index 374dedd14..63cb263d9 100644
--- a/XenAdmin/Diagnostics/Problems/SRProblem/UnsupportedStorageLinkSrIsPresentProblem.cs
+++ b/XenAdmin/Diagnostics/Problems/SRProblem/UnsupportedStorageLinkSrIsPresentProblem.cs
@@ -46,7 +46,7 @@ namespace XenAdmin.Diagnostics.Problems.SRProblem
public override Uri UriToLaunch {
get
{
- return XenAdmin.Core.Registry.LinkLabelHidden ? null : new Uri(InvisibleMessages.ISL_DEPRECATION_URL);
+ return XenAdmin.Core.HiddenFeatures.LinkLabelHidden ? null : new Uri(InvisibleMessages.ISL_DEPRECATION_URL);
}
}
diff --git a/XenAdmin/Dialogs/AboutDialog.cs b/XenAdmin/Dialogs/AboutDialog.cs
index 87b85efe8..01efdbe12 100644
--- a/XenAdmin/Dialogs/AboutDialog.cs
+++ b/XenAdmin/Dialogs/AboutDialog.cs
@@ -54,7 +54,7 @@ namespace XenAdmin.Dialogs
VersionLabel.Text = string.Format(Messages.VERSION_NUMBER, Branding.PRODUCT_VERSION_TEXT,
Branding.XENCENTER_VERSION, buildText, IntPtr.Size * 8);
label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
- label2.Visible = !Registry.CopyrightHidden;
+ label2.Visible = !HiddenFeatures.CopyrightHidden;
}
private void OkButton_Click(object sender, EventArgs e)
diff --git a/XenAdmin/Dialogs/ConnectionRefusedDialog.cs b/XenAdmin/Dialogs/ConnectionRefusedDialog.cs
index 4e8cd742f..dece4cd89 100644
--- a/XenAdmin/Dialogs/ConnectionRefusedDialog.cs
+++ b/XenAdmin/Dialogs/ConnectionRefusedDialog.cs
@@ -40,7 +40,7 @@ namespace XenAdmin.Dialogs
public ConnectionRefusedDialog()
{
InitializeComponent();
- this.linkLabel.Visible = !XenAdmin.Core.Registry.LinkLabelHidden;
+ this.linkLabel.Visible = !XenAdmin.Core.HiddenFeatures.LinkLabelHidden;
}
public string ErrorMessage
diff --git a/XenAdmin/Dialogs/LegalNoticesDialog.cs b/XenAdmin/Dialogs/LegalNoticesDialog.cs
index 000568c07..5496909d0 100644
--- a/XenAdmin/Dialogs/LegalNoticesDialog.cs
+++ b/XenAdmin/Dialogs/LegalNoticesDialog.cs
@@ -46,7 +46,7 @@ namespace XenAdmin.Dialogs
{
InitializeComponent();
label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
- this.label1.Visible = this.label2.Visible = !XenAdmin.Core.Registry.CopyrightHidden;
+ this.label1.Visible = this.label2.Visible = !XenAdmin.Core.HiddenFeatures.CopyrightHidden;
}
private void button1_Click(object sender, EventArgs e)
diff --git a/XenAdmin/Dialogs/LicenseManager/LicenseManagerController.cs b/XenAdmin/Dialogs/LicenseManager/LicenseManagerController.cs
index 728d9da8c..08d2469af 100644
--- a/XenAdmin/Dialogs/LicenseManager/LicenseManagerController.cs
+++ b/XenAdmin/Dialogs/LicenseManager/LicenseManagerController.cs
@@ -53,7 +53,7 @@ namespace XenAdmin.Dialogs
{
ActivationRequest = new LicenseActivationRequest();
VerifierFactory = new LicenseSelectionVerifierFactory();
- ReadOnlyView = Registry.LicenseOperationsHidden;
+ ReadOnlyView = HiddenFeatures.LicenseOperationsHidden;
}
public LicenseManagerController(ILicenseManagerView view)
diff --git a/XenAdmin/Dialogs/NewPoolDialog.cs b/XenAdmin/Dialogs/NewPoolDialog.cs
index 2249984d2..7e636398e 100644
--- a/XenAdmin/Dialogs/NewPoolDialog.cs
+++ b/XenAdmin/Dialogs/NewPoolDialog.cs
@@ -161,7 +161,7 @@ namespace XenAdmin.Dialogs
Helpers.FeatureForbidden(host, Host.RestrictCpuMasking) &&
!PoolJoinRules.FreeHostPaidMaster(host, master, false))) // in this case we can upgrade the license and then mask the CPU
{
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_CPUMASKING : Messages.UPSELL_BLURB_CPUMASKING + Messages.UPSELL_BLURB_CPUMASKING_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_CPUMASKING : Messages.UPSELL_BLURB_CPUMASKING + Messages.UPSELL_BLURB_CPUMASKING_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPUMASKING);
dlg.ShowDialog(this);
return;
diff --git a/XenAdmin/Dialogs/OptionsPages/ConsolesOptionsPage.cs b/XenAdmin/Dialogs/OptionsPages/ConsolesOptionsPage.cs
index ec7b58992..4021cb372 100644
--- a/XenAdmin/Dialogs/OptionsPages/ConsolesOptionsPage.cs
+++ b/XenAdmin/Dialogs/OptionsPages/ConsolesOptionsPage.cs
@@ -37,6 +37,7 @@ using System.Data;
using System.Text;
using System.Windows.Forms;
using XenAdmin.Properties;
+using XenAdmin.Core;
namespace XenAdmin.Dialogs.OptionsPages
@@ -74,7 +75,7 @@ namespace XenAdmin.Dialogs.OptionsPages
// Console scaling
PreserveUndockedScaleCheckBox.Checked = Properties.Settings.Default.PreserveScaleWhenUndocked;
PreserveVNCConsoleScalingCheckBox.Checked = Properties.Settings.Default.PreserveScaleWhenSwitchBackToVNC;
- checkBoxDisableRDPPolling.Visible = !XenAdmin.Core.Registry.RDPPollingHidden;
+ checkBoxDisableRDPPolling.Visible = !HiddenFeatures.RDPPollingHidden;
checkBoxDisableRDPPolling.Checked = Properties.Settings.Default.EnableRDPPolling;
}
diff --git a/XenAdmin/Dialogs/OptionsPages/PluginOptionsPage.cs b/XenAdmin/Dialogs/OptionsPages/PluginOptionsPage.cs
index d0400d375..1a909b081 100644
--- a/XenAdmin/Dialogs/OptionsPages/PluginOptionsPage.cs
+++ b/XenAdmin/Dialogs/OptionsPages/PluginOptionsPage.cs
@@ -68,7 +68,7 @@ namespace XenAdmin.Dialogs.OptionsPages
InitializeComponent();
m_tlpScanning.Visible = false;
labelNoPlugins.Visible = false;
- this.linkLabel1.Visible = !XenAdmin.Core.Registry.LinkLabelHidden;
+ this.linkLabel1.Visible = !XenAdmin.Core.HiddenFeatures.LinkLabelHidden;
}
public static void Log()
diff --git a/XenAdmin/Dialogs/PropertiesDialog.cs b/XenAdmin/Dialogs/PropertiesDialog.cs
index 24cfe1513..52e648fe7 100644
--- a/XenAdmin/Dialogs/PropertiesDialog.cs
+++ b/XenAdmin/Dialogs/PropertiesDialog.cs
@@ -156,7 +156,7 @@ namespace XenAdmin.Dialogs
if (Helpers.FeatureForbidden(xenObjectCopy, Host.RestrictAlerts))
{
PerfmonAlertUpsellEditPage = new UpsellPage {Image = Properties.Resources._000_Alert2_h32bit_16, Text = Messages.ALERTS};
- PerfmonAlertUpsellEditPage.SetAllTexts(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_ALERTS : Messages.UPSELL_BLURB_ALERTS + Messages.UPSELL_BLURB_ALERTS_MORE,
+ PerfmonAlertUpsellEditPage.SetAllTexts(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_ALERTS : Messages.UPSELL_BLURB_ALERTS + Messages.UPSELL_BLURB_ALERTS_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_ALERTS);
ShowTab(PerfmonAlertUpsellEditPage);
}
@@ -171,7 +171,7 @@ namespace XenAdmin.Dialogs
if (Helpers.FeatureForbidden(xenObjectCopy, Host.RestrictAlerts))
{
PerfmonAlertOptionsUpsellEditPage = new UpsellPage {Image = Properties.Resources._000_Email_h32bit_16, Text = Messages.EMAIL_OPTIONS};
- PerfmonAlertOptionsUpsellEditPage.SetAllTexts(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_ALERTS : Messages.UPSELL_BLURB_ALERTS + Messages.UPSELL_BLURB_ALERTS_MORE,
+ PerfmonAlertOptionsUpsellEditPage.SetAllTexts(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_ALERTS : Messages.UPSELL_BLURB_ALERTS + Messages.UPSELL_BLURB_ALERTS_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_ALERTS);
ShowTab(PerfmonAlertOptionsUpsellEditPage);
}
@@ -211,7 +211,7 @@ namespace XenAdmin.Dialogs
if (Helpers.FeatureForbidden(xenObjectCopy, Host.RestrictGpu))
{
GpuUpsellEditPage = new UpsellPage { Image = Properties.Resources._000_GetMemoryInfo_h32bit_16, Text = Messages.GPU };
- GpuUpsellEditPage.SetAllTexts(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_GPU : Messages.UPSELL_BLURB_GPU + Messages.UPSELL_BLURB_GPU_MORE,
+ GpuUpsellEditPage.SetAllTexts(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_GPU : Messages.UPSELL_BLURB_GPU + Messages.UPSELL_BLURB_GPU_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_GPU);
ShowTab(GpuUpsellEditPage);
}
diff --git a/XenAdmin/Dialogs/VMProtectionRecovery/VMProtectionPoliciesDialog.cs b/XenAdmin/Dialogs/VMProtectionRecovery/VMProtectionPoliciesDialog.cs
index 946bf8b46..f2476d5e4 100644
--- a/XenAdmin/Dialogs/VMProtectionRecovery/VMProtectionPoliciesDialog.cs
+++ b/XenAdmin/Dialogs/VMProtectionRecovery/VMProtectionPoliciesDialog.cs
@@ -296,7 +296,7 @@ namespace XenAdmin.Dialogs.VMProtection_Recovery
deprecationBanner.AppliesToVersion = Messages.XENSERVER_6_2;
deprecationBanner.BannerType = DeprecationBanner.Type.Removal;
deprecationBanner.FeatureName = Messages.VMPP;
- deprecationBanner.LinkUri = XenAdmin.Core.Registry.LinkLabelHidden ? null : new Uri(InvisibleMessages.VMPR_DEPRECATION_URL);
+ deprecationBanner.LinkUri = HiddenFeatures.LinkLabelHidden ? null : new Uri(InvisibleMessages.VMPR_DEPRECATION_URL);
deprecationBanner.Visible = true;
}
}
diff --git a/XenAdmin/LicenseTimer.cs b/XenAdmin/LicenseTimer.cs
index 3dac27b97..2cc56db66 100644
--- a/XenAdmin/LicenseTimer.cs
+++ b/XenAdmin/LicenseTimer.cs
@@ -76,7 +76,7 @@ namespace XenAdmin
internal bool CheckActiveServerLicense(IXenConnection connection, bool periodicCheck)
{
// don't popup the license manager dialog if host is ClearwaterOrGreater and the feature is disabled
- bool popupLicenseMgr = !(Helpers.ClearwaterOrGreater(connection) && Registry.LicenseNagHidden);
+ bool popupLicenseMgr = !(Helpers.ClearwaterOrGreater(connection) && HiddenFeatures.LicenseNagHidden);
// If the host is Dundee or greater, then the license alerts are generated by the server, so XenCenter shouldn't create any license alerts
bool createAlert = !Helpers.DundeeOrGreater(connection);
diff --git a/XenAdmin/MainWindow.cs b/XenAdmin/MainWindow.cs
index 2626e3c36..f01525dd5 100644
--- a/XenAdmin/MainWindow.cs
+++ b/XenAdmin/MainWindow.cs
@@ -226,8 +226,8 @@ namespace XenAdmin
licenseTimer = new LicenseTimer(licenseManagerLauncher);
GeneralPage.LicenseLauncher = licenseManagerLauncher;
- toolStripSeparator7.Visible = xenSourceOnTheWebToolStripMenuItem.Visible = xenCenterPluginsOnlineToolStripMenuItem.Visible = !XenAdmin.Core.Registry.ToolStripMenuItemHidden;
- healthCheckToolStripMenuItem1.Visible = !XenAdmin.Core.Registry.HealthCheckHidden;
+ toolStripSeparator7.Visible = xenSourceOnTheWebToolStripMenuItem.Visible = xenCenterPluginsOnlineToolStripMenuItem.Visible = !HiddenFeatures.ToolStripMenuItemHidden;
+ healthCheckToolStripMenuItem1.Visible = !HiddenFeatures.HealthCheckHidden;
}
private void Default_SettingChanging(object sender, SettingChangingEventArgs e)
@@ -808,7 +808,7 @@ namespace XenAdmin
Program.Invoke(Program.MainWindow, delegate()
{
string msg = string.Format(Messages.GUI_OUT_OF_DATE, Helpers.GetName(master));
- if (!XenAdmin.Core.Registry.LinkLabelHidden)
+ if (!HiddenFeatures.LinkLabelHidden)
msg = msg + Messages.GUI_OUT_OF_DATE_MORE;
string url = "https://" + connection.Hostname;
@@ -857,7 +857,7 @@ namespace XenAdmin
private void CheckHealthCheckEnrollment(object connection)
{
- if (HealthCheckOverviewLauncher != null && !XenAdmin.Core.Registry.HealthCheckHidden)
+ if (HealthCheckOverviewLauncher != null && !HiddenFeatures.HealthCheckHidden)
HealthCheckOverviewLauncher.CheckHealthCheckEnrollment((IXenConnection) connection);
}
diff --git a/XenAdmin/SettingsPanels/VMAdvancedEditPage.cs b/XenAdmin/SettingsPanels/VMAdvancedEditPage.cs
index d2d86bc88..fe31eb881 100644
--- a/XenAdmin/SettingsPanels/VMAdvancedEditPage.cs
+++ b/XenAdmin/SettingsPanels/VMAdvancedEditPage.cs
@@ -65,7 +65,7 @@ namespace XenAdmin.SettingsPanels
ToolTipIcon = ToolTipIcon.Warning,
ToolTipTitle = Messages.INVALID_PARAMETER
};
- this.CPSOptimizationRadioButton.Visible = !XenAdmin.Core.Registry.CPSOptimizationHidden;
+ this.CPSOptimizationRadioButton.Visible = !HiddenFeatures.CPSOptimizationHidden;
}
public String SubText
diff --git a/XenAdmin/TabPages/AdPage.cs b/XenAdmin/TabPages/AdPage.cs
index dafcdc96e..f8a9d8383 100644
--- a/XenAdmin/TabPages/AdPage.cs
+++ b/XenAdmin/TabPages/AdPage.cs
@@ -1019,7 +1019,7 @@ namespace XenAdmin.TabPages
if (Helpers.FeatureForbidden(pool.Connection, Host.RestrictRBAC))
{
// Show upsell dialog
- UpsellDialog dlg = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_RBAC : Messages.UPSELL_BLURB_RBAC + Messages.UPSELL_BLURB_RBAC_MORE,
+ UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_RBAC : Messages.UPSELL_BLURB_RBAC + Messages.UPSELL_BLURB_RBAC_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_RBAC);
dlg.ShowDialog(this);
return;
diff --git a/XenAdmin/TabPages/HomePage.cs b/XenAdmin/TabPages/HomePage.cs
index 9e2221d26..3addbebf7 100644
--- a/XenAdmin/TabPages/HomePage.cs
+++ b/XenAdmin/TabPages/HomePage.cs
@@ -89,7 +89,7 @@ namespace XenAdmin.TabPages
private void panelTry_Click(object sender, EventArgs e)
{
- if (!XenAdmin.Core.Registry.LinkLabelHidden)
+ if (!HiddenFeatures.LinkLabelHidden)
Program.OpenURL(InvisibleMessages.XENDESKTOP_URL);
}
diff --git a/XenAdmin/TabPages/PerformancePage.cs b/XenAdmin/TabPages/PerformancePage.cs
index 1c90c6d8b..a28e53c8c 100644
--- a/XenAdmin/TabPages/PerformancePage.cs
+++ b/XenAdmin/TabPages/PerformancePage.cs
@@ -303,7 +303,7 @@ namespace XenAdmin.TabPages
private void ShowUpsell()
{
- UpsellDialog upsellDialog = new UpsellDialog(XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_PERFORMANCE : Messages.UPSELL_BLURB_PERFORMANCE + Messages.UPSELL_BLURB_PERFORMANCE_MORE,
+ UpsellDialog upsellDialog = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_PERFORMANCE : Messages.UPSELL_BLURB_PERFORMANCE + Messages.UPSELL_BLURB_PERFORMANCE_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_PERFORMANCE);
upsellDialog.ShowDialog(this);
}
diff --git a/XenAdmin/TabPages/SrStoragePage.cs b/XenAdmin/TabPages/SrStoragePage.cs
index 5adcd48b6..886c81361 100644
--- a/XenAdmin/TabPages/SrStoragePage.cs
+++ b/XenAdmin/TabPages/SrStoragePage.cs
@@ -116,8 +116,8 @@ namespace XenAdmin.TabPages
Banner.AppliesToVersion = Messages.XENSERVER_6_5;
Banner.BannerType = DeprecationBanner.Type.Removal;
Banner.FeatureName = Messages.ISL_SR;
- Banner.LinkUri = XenAdmin.Core.Registry.LinkLabelHidden ? null : new Uri(InvisibleMessages.ISL_DEPRECATION_URL);
- Banner.Visible = !XenAdmin.Core.Registry.LinkLabelHidden;
+ Banner.LinkUri = HiddenFeatures.LinkLabelHidden ? null : new Uri(InvisibleMessages.ISL_DEPRECATION_URL);
+ Banner.Visible = !HiddenFeatures.LinkLabelHidden;
}
else
Banner.Visible = false;
diff --git a/XenAdmin/TabPages/UpsellTabPage.cs b/XenAdmin/TabPages/UpsellTabPage.cs
index 06b439d20..d588761d0 100644
--- a/XenAdmin/TabPages/UpsellTabPage.cs
+++ b/XenAdmin/TabPages/UpsellTabPage.cs
@@ -36,6 +36,7 @@ using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
+using XenAdmin.Core;
namespace XenAdmin.TabPages
@@ -54,14 +55,14 @@ namespace XenAdmin.TabPages
public class BallooningUpsellPage : UpsellTabPage
{
public BallooningUpsellPage()
- : base(Messages.DYNAMIC_MEMORY_CONTROL, XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_DMC : Messages.UPSELL_BLURB_DMC + Messages.UPSELL_BLURB_DMC_MORE, InvisibleMessages.UPSELL_LEARNMOREURL_DMC)
+ : base(Messages.DYNAMIC_MEMORY_CONTROL, HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DMC : Messages.UPSELL_BLURB_DMC + Messages.UPSELL_BLURB_DMC_MORE, InvisibleMessages.UPSELL_LEARNMOREURL_DMC)
{ }
}
public class HAUpsellPage : UpsellTabPage
{
public HAUpsellPage()
- : base(Messages.HIGH_AVAILABILITY, XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_HA : Messages.UPSELL_BLURB_HA + Messages.UPSELL_BLURB_HA_MORE, InvisibleMessages.UPSELL_LEARNMOREURL_HA)
+ : base(Messages.HIGH_AVAILABILITY, HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_HA : Messages.UPSELL_BLURB_HA + Messages.UPSELL_BLURB_HA_MORE, InvisibleMessages.UPSELL_LEARNMOREURL_HA)
{ }
}
@@ -69,7 +70,7 @@ namespace XenAdmin.TabPages
{
public WLBUpsellPage()
: base(Messages.WORKLOAD_BALANCING,
- XenAdmin.Core.Registry.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
+ HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_WLB)
{ }
}
diff --git a/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageDestination.cs b/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageDestination.cs
index 667e574d4..13a0e0dae 100644
--- a/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageDestination.cs
+++ b/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageDestination.cs
@@ -73,7 +73,7 @@ namespace XenAdmin.Wizards.BugToolWizardFiles
}
usernameTextBox.Visible = usernameLabel.Visible = passwordLabel.Visible = passwordTextBox.Visible =
caseNumberLabel.Visible = caseNumberTextBox.Visible = optionalLabel.Visible =
- richTextBox1.Visible = uploadCheckBox.Visible = !XenAdmin.Core.Registry.UploadOptionHidden;
+ richTextBox1.Visible = uploadCheckBox.Visible = !HiddenFeatures.UploadOptionHidden;
}
public override string Text { get { return Messages.BUGTOOL_PAGE_DESTINATION_TEXT; } }
diff --git a/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs b/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs
index 7eba35754..54f89c46c 100644
--- a/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs
+++ b/XenAdmin/Wizards/BugToolWizardFiles/BugToolPageSelectCapabilities.cs
@@ -66,7 +66,7 @@ namespace XenAdmin.Wizards.BugToolWizardFiles
//set this here due to a framework bug
splitContainer1.Panel1MinSize = 250;
splitContainer1.Panel2MinSize = 200;
- this.linkLabel1.Visible = !XenAdmin.Core.Registry.LinkLabelHidden;
+ this.linkLabel1.Visible = !XenAdmin.Core.HiddenFeatures.LinkLabelHidden;
}
public override string Text{get { return Messages.BUGTOOL_PAGE_CAPABILITIES_TEXT; }}
diff --git a/XenAdmin/Wizards/NewNetworkWizard_Pages/NetWTypeSelect.cs b/XenAdmin/Wizards/NewNetworkWizard_Pages/NetWTypeSelect.cs
index d83b50ed0..64aef91dd 100644
--- a/XenAdmin/Wizards/NewNetworkWizard_Pages/NetWTypeSelect.cs
+++ b/XenAdmin/Wizards/NewNetworkWizard_Pages/NetWTypeSelect.cs
@@ -82,7 +82,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
return;
Pool pool = Helpers.GetPoolOfOne(connection);
- labelCHIN.Visible = rbtnCHIN.Visible = !XenAdmin.Core.Registry.CrossServerPrivateNetworkHidden;
+ labelCHIN.Visible = rbtnCHIN.Visible = !HiddenFeatures.CrossServerPrivateNetworkHidden;
if (!pool.vSwitchController)
{
rbtnCHIN.Checked = false;
@@ -93,7 +93,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
Messages.FIELD_DISABLED :
Messages.CHINS_NEED_VSWITCHCONTROLLER;
- iconWarningChinOption.Visible = labelWarningChinOption.Visible = !XenAdmin.Core.Registry.CrossServerPrivateNetworkHidden;
+ iconWarningChinOption.Visible = labelWarningChinOption.Visible = !HiddenFeatures.CrossServerPrivateNetworkHidden;
rbtnExternalNetwork.Checked = true;
}
diff --git a/XenAdmin/Wizards/NewSRWizard_Pages/ChooseSrTypePage.cs b/XenAdmin/Wizards/NewSRWizard_Pages/ChooseSrTypePage.cs
index 6dbc81b1e..f6bee6f7a 100644
--- a/XenAdmin/Wizards/NewSRWizard_Pages/ChooseSrTypePage.cs
+++ b/XenAdmin/Wizards/NewSRWizard_Pages/ChooseSrTypePage.cs
@@ -72,8 +72,8 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
deprecationBanner.AppliesToVersion = Messages.XENSERVER_6_5;
deprecationBanner.BannerType = DeprecationBanner.Type.Removal;
deprecationBanner.FeatureName = Messages.ISL_SR;
- deprecationBanner.LinkUri = XenAdmin.Core.Registry.LinkLabelHidden ? null : new Uri(InvisibleMessages.ISL_DEPRECATION_URL);
- deprecationBanner.Visible = !XenAdmin.Core.Registry.LinkLabelHidden;
+ deprecationBanner.LinkUri = HiddenFeatures.LinkLabelHidden ? null : new Uri(InvisibleMessages.ISL_DEPRECATION_URL);
+ deprecationBanner.Visible = !HiddenFeatures.LinkLabelHidden;
}
else
deprecationBanner.Visible = false;
diff --git a/XenAdmin/XenAdmin.csproj b/XenAdmin/XenAdmin.csproj
index 83203098f..5a5900fd4 100644
--- a/XenAdmin/XenAdmin.csproj
+++ b/XenAdmin/XenAdmin.csproj
@@ -205,6 +205,7 @@
UpsellPage.cs
+