CP-15401: Make Cross-server private network hide by reg key

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
This commit is contained in:
Cheng Zhang 2016-01-22 14:30:28 +08:00
parent 88d881b126
commit e488c62175
4 changed files with 28 additions and 21 deletions

View File

@ -337,31 +337,37 @@ namespace XenAdmin.Core
internal static bool CPSOptimizationHidden
{
get
{ return HiddenFeatures.Contains(CPS_OPTIMIZATION_HIDDEN); }
{ return HiddenFeatures != null && HiddenFeatures.Contains(CPS_OPTIMIZATION_HIDDEN); }
}
internal static bool RDPPollingHidden
{
get
{ return HiddenFeatures.Contains(RDP_POLLING_HIDDEN); }
{ return HiddenFeatures != null && HiddenFeatures.Contains(RDP_POLLING_HIDDEN); }
}
internal static bool LearnMoreButtonHidden
{
get
{ return HiddenFeatures.Contains(LEARN_MORE_HIDDEN); }
{ return HiddenFeatures != null && HiddenFeatures.Contains(LEARN_MORE_HIDDEN); }
}
internal static bool LinkLabelHidden
{
get
{ return HiddenFeatures.Contains(LINK_LABEL_HIDDEN); }
{ return HiddenFeatures != null && HiddenFeatures.Contains(LINK_LABEL_HIDDEN); }
}
internal static bool ToolStripMenuItemHidden
{
get
{ return HiddenFeatures.Contains(TOOL_STRIP_MENU_ITEM); }
{ 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); }
}
private const string SSL_CERTIFICATES_CHANGED_ONLY = "CHANGED";
@ -390,7 +396,8 @@ namespace XenAdmin.Core
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 = "tool_strip_menu_item";
private const string TOOL_STRIP_MENU_ITEM_HIDDEN = "tool_strip_menu_item";
private const string CROSS_SERVER_PRIVATE_NETWORK_HIDDEN = "cross_server_private_network";
}
public enum SSLCertificateTypes { None, Changed, All }

View File

@ -108,10 +108,10 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
this.flowLayoutPanel1.Controls.Add(this.labelExternalNetwork);
this.flowLayoutPanel1.Controls.Add(this.rbtnInternalNetwork);
this.flowLayoutPanel1.Controls.Add(this.label1);
this.flowLayoutPanel1.Controls.Add(this.rbtnCHIN);
this.flowLayoutPanel1.Controls.Add(this.labelCHIN);
this.flowLayoutPanel1.Controls.Add(this.rbtnBondedNetwork);
this.flowLayoutPanel1.Controls.Add(this.label3);
this.flowLayoutPanel1.Controls.Add(this.rbtnCHIN);
this.flowLayoutPanel1.Controls.Add(this.labelCHIN);
this.flowLayoutPanel1.Controls.Add(this.warningsTable);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
//

View File

@ -82,7 +82,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
return;
Pool pool = Helpers.GetPoolOfOne(connection);
labelCHIN.Visible = rbtnCHIN.Visible = !XenAdmin.Core.Registry.CrossServerPrivateNetworkHidden;
if (!pool.vSwitchController)
{
rbtnCHIN.Checked = false;
@ -93,7 +93,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_ENTERPRISE_OR_PLATINUM_PLURAL, Messages.CHINS) :
Messages.CHINS_NEED_VSWITCHCONTROLLER;
iconWarningChinOption.Visible = labelWarningChinOption.Visible = true;
iconWarningChinOption.Visible = labelWarningChinOption.Visible = !XenAdmin.Core.Registry.CrossServerPrivateNetworkHidden;
rbtnExternalNetwork.Checked = true;
}

View File

@ -202,7 +202,7 @@
<value>NoControl</value>
</data>
<data name="rbtnBondedNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 204</value>
<value>20, 136</value>
</data>
<data name="rbtnBondedNetwork.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 6, 3, 3</value>
@ -226,7 +226,7 @@
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnBondedNetwork.ZOrder" xml:space="preserve">
<value>7</value>
<value>5</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -241,7 +241,7 @@
<value>46, 0, 3, 3</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 26</value>
<value>361, 26</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@ -269,7 +269,7 @@ This can be used as a private connection between VMs on the same host.</value>
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>46, 224</value>
<value>46, 156</value>
</data>
<data name="label3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>46, 0, 3, 3</value>
@ -294,7 +294,7 @@ This will create a single higher performing channel.</value>
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>8</value>
<value>6</value>
</data>
<data name="labelCHIN.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@ -306,13 +306,13 @@ This will create a single higher performing channel.</value>
<value>NoControl</value>
</data>
<data name="labelCHIN.Location" type="System.Drawing.Point, System.Drawing">
<value>46, 156</value>
<value>46, 211</value>
</data>
<data name="labelCHIN.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>46, 0, 3, 3</value>
</data>
<data name="labelCHIN.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 39</value>
<value>361, 39</value>
</data>
<data name="labelCHIN.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@ -332,7 +332,7 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelCHIN.ZOrder" xml:space="preserve">
<value>6</value>
<value>8</value>
</data>
<data name="labelExternalNetwork.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@ -350,7 +350,7 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>46, 0, 3, 3</value>
</data>
<data name="labelExternalNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 13</value>
<value>361, 13</value>
</data>
<data name="labelExternalNetwork.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -380,7 +380,7 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>NoControl</value>
</data>
<data name="rbtnCHIN.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 136</value>
<value>20, 191</value>
</data>
<data name="rbtnCHIN.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 6, 3, 3</value>
@ -404,7 +404,7 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnCHIN.ZOrder" xml:space="preserve">
<value>5</value>
<value>7</value>
</data>
<data name="rbtnExternalNetwork.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>