CP-15401: Make legal notice change by reg key

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
This commit is contained in:
Cheng Zhang 2016-01-22 16:46:10 +08:00
parent e488c62175
commit 7793f8547e
7 changed files with 222 additions and 93 deletions

View File

@ -370,6 +370,12 @@ namespace XenAdmin.Core
{ return HiddenFeatures != null && HiddenFeatures.Contains(CROSS_SERVER_PRIVATE_NETWORK_HIDDEN); }
}
internal static bool CopyrightHidden
{
get
{ return HiddenFeatures != null && HiddenFeatures.Contains(COPYRIGHT_HIDDEN); }
}
private const string SSL_CERTIFICATES_CHANGED_ONLY = "CHANGED";
private const string SSL_CERTIFICATES_ALL = "ALL";
private const string SSL_CERTIFICATES_KEY = "ForceSSLCertificates";
@ -398,6 +404,7 @@ namespace XenAdmin.Core
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";
}
public enum SSLCertificateTypes { None, Changed, All }

View File

@ -54,6 +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;
}
private void OkButton_Click(object sender, EventArgs e)

View File

@ -29,18 +29,25 @@ namespace XenAdmin.Dialogs
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LegalNoticesDialog));
this.label2 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// label2
// panel1
//
resources.ApplyResources(this.label2, "label2");
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Name = "label2";
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.label2);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// label1
//
@ -48,11 +55,18 @@ namespace XenAdmin.Dialogs
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label3
// label2
//
resources.ApplyResources(this.label3, "label3");
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Name = "label3";
resources.ApplyResources(this.label2, "label2");
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Name = "label2";
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.textBox1);
this.panel2.Controls.Add(this.label3);
this.panel2.Name = "panel2";
//
// textBox1
//
@ -61,6 +75,18 @@ namespace XenAdmin.Dialogs
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Name = "label3";
//
// panel3
//
this.panel3.Controls.Add(this.button1);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// button1
//
resources.ApplyResources(this.button1, "button1");
@ -70,16 +96,18 @@ namespace XenAdmin.Dialogs
//
// LegalNoticesDialog
//
this.AcceptButton = this.button1;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.label2);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.HelpButton = false;
this.Name = "LegalNoticesDialog";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -87,10 +115,13 @@ namespace XenAdmin.Dialogs
#endregion
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Button button1;
}
}

View File

@ -46,6 +46,9 @@ namespace XenAdmin.Dialogs
{
InitializeComponent();
label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
this.panel1.Visible = !XenAdmin.Core.Registry.CopyrightHidden;
if (XenAdmin.Core.Registry.CopyrightHidden)
this.textBox1.SetBounds(textBox1.Location.X, textBox1.Location.Y, textBox1.Size.Width, 200);
}
private void button1_Click(object sender, EventArgs e)

View File

@ -175,7 +175,7 @@
<value>3</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>@BRANDING_COMPANY_NAME_SHORT@、@BRANDING_COMPANY_NAME_SHORT@ @BRANDING_PRODUCT_BRAND@、Xen、Xen のロゴ、@BRANDING_BRAND_CONSOLE@、XenMotion は、米国およびその他の国の @BRANDING_COMPANY_NAME_LEGAL@ の商標または登録商標です。</value>
<value>Citrix、Citrix XenServer、Xen、Xen のロゴ、XenCenter、XenMotion は、米国およびその他の国の Citrix Systems, Inc. の商標または登録商標です。</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>

View File

@ -117,20 +117,53 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label2.Font" type="System.Drawing.Font, System.Drawing">
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 32</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>571, 42</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Citrix, Citrix XenServer, Xen, the Xen logo, XenCenter, XenMotion are trademarks and/or registered trademarks of Citrix Systems, Inc. in the United States and other countries.</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>14, 14</value>
<value>13, 8</value>
</data>
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
@ -139,7 +172,7 @@
<value>275, 15</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>4</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Copyright © Citrix Systems, Inc. All rights reserved.</value>
@ -151,85 +184,46 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>$this</value>
<value>panel1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>4</value>
<value>1</value>
</data>
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>14, 38</value>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 82</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>571, 42</value>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>@BRANDING_COMPANY_NAME_SHORT@, @BRANDING_COMPANY_NAME_SHORT@ @BRANDING_PRODUCT_BRAND@, Xen, the Xen logo, @BRANDING_BRAND_CONSOLE@, XenMotion are trademarks and/or registered trademarks of @BRANDING_COMPANY_NAME_LEGAL@ in the United States and other countries.</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>14, 90</value>
</data>
<data name="label3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>308, 15</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>This software includes the following third-party software:</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="panel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="textBox1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="textBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 112</value>
<value>16, 26</value>
</data>
<data name="textBox1.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
@ -241,7 +235,7 @@
<value>568, 110</value>
</data>
<data name="textBox1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>7</value>
</data>
<data name="textBox1.Text" xml:space="preserve">
<value>everRun is a registered trademark of Stratus Technologies Bermuda Limited.
@ -346,22 +340,88 @@ Xen, the Xen logo, XenMotion are trademarks and/or registered trademarks of Citr
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textBox1.Parent" xml:space="preserve">
<value>$this</value>
<value>panel2</value>
</data>
<data name="&gt;&gt;textBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 4</value>
</data>
<data name="label3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>308, 15</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>This software includes the following third-party software:</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel2.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 82</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 184</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="button1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="button1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
<value>510, 231</value>
<value>509, 10</value>
</data>
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="button1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="button1.Text" xml:space="preserve">
<value>OK</value>
@ -373,11 +433,38 @@ Xen, the Xen logo, XenMotion are trademarks and/or registered trademarks of Citr
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;button1.Parent" xml:space="preserve">
<value>$this</value>
<value>panel3</value>
</data>
<data name="&gt;&gt;button1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel3.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 224</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 42</value>
</data>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel3.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -175,7 +175,7 @@
<value>3</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>@BRANDING_COMPANY_NAME_SHORT@、@BRANDING_COMPANY_NAME_SHORT@ @BRANDING_PRODUCT_BRAND@、Xen、Xen 徽标、@BRANDING_BRAND_CONSOLE@、XenMotion 是 @BRANDING_COMPANY_NAME_LEGAL@ 在美国及其他国家/地区的商标和/或注册商标。</value>
<value>Citrix、Citrix XenServer、Xen、Xen 徽标、XenCenter、XenMotion 是 Citrix Systems, Inc. 在美国及其他国家/地区的商标和/或注册商标。</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>