From 38fcc838745dd05a3b9f45fb9ed89fec795c5597 Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Thu, 25 Jul 2019 09:07:24 +0100 Subject: [PATCH] Fixed labels; removed unnecessary control disablement. The blurbs should be user-centric rather than developer-centric. No need to disable the page controls in the absence of signature/manifest since the whole page becomes disabled in that case. Signed-off-by: Konstantina Chremmou --- .../ImportSecurityPage.Designer.cs | 23 +-- .../ImportWizard/ImportSecurityPage.cs | 11 +- .../ImportWizard/ImportSecurityPage.resx | 150 +++++++----------- XenModel/Messages.Designer.cs | 4 +- XenModel/Messages.resx | 4 +- 5 files changed, 76 insertions(+), 116 deletions(-) diff --git a/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.Designer.cs b/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.Designer.cs index a53bac619..fb51045bb 100644 --- a/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.Designer.cs +++ b/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.Designer.cs @@ -34,16 +34,14 @@ this.lblSecurityIntro = new XenAdmin.Controls.Common.AutoHeightLabel(); this.m_linkCertificate = new System.Windows.Forms.LinkLabel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.m_tlpManifest = new System.Windows.Forms.TableLayoutPanel(); this.m_ctrlError = new XenAdmin.Controls.Common.PasswordFailure(); this.tableLayoutPanel1.SuspendLayout(); - this.m_tlpManifest.SuspendLayout(); this.SuspendLayout(); // // m_labelVerify // resources.ApplyResources(this.m_labelVerify, "m_labelVerify"); - this.m_tlpManifest.SetColumnSpan(this.m_labelVerify, 2); + this.tableLayoutPanel1.SetColumnSpan(this.m_labelVerify, 2); this.m_labelVerify.Name = "m_labelVerify"; // // m_checkBoxVerify @@ -56,6 +54,7 @@ // lblSecurityIntro // resources.ApplyResources(this.lblSecurityIntro, "lblSecurityIntro"); + this.tableLayoutPanel1.SetColumnSpan(this.lblSecurityIntro, 2); this.lblSecurityIntro.Name = "lblSecurityIntro"; // // m_linkCertificate @@ -68,22 +67,17 @@ // tableLayoutPanel1 // resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); - this.tableLayoutPanel1.Controls.Add(this.m_tlpManifest, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.m_linkCertificate, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.m_checkBoxVerify, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.m_labelVerify, 0, 1); this.tableLayoutPanel1.Controls.Add(this.lblSecurityIntro, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.m_ctrlError, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.m_ctrlError, 0, 4); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; // - // m_tlpManifest - // - resources.ApplyResources(this.m_tlpManifest, "m_tlpManifest"); - this.m_tlpManifest.Controls.Add(this.m_linkCertificate, 1, 2); - this.m_tlpManifest.Controls.Add(this.m_labelVerify, 0, 0); - this.m_tlpManifest.Controls.Add(this.m_checkBoxVerify, 0, 2); - this.m_tlpManifest.Name = "m_tlpManifest"; - // // m_ctrlError // resources.ApplyResources(this.m_ctrlError, "m_ctrlError"); + this.tableLayoutPanel1.SetColumnSpan(this.m_ctrlError, 2); this.m_ctrlError.Name = "m_ctrlError"; // // ImportSecurityPage @@ -94,8 +88,6 @@ this.Name = "ImportSecurityPage"; this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); - this.m_tlpManifest.ResumeLayout(false); - this.m_tlpManifest.PerformLayout(); this.ResumeLayout(false); } @@ -107,7 +99,6 @@ private XenAdmin.Controls.Common.AutoHeightLabel lblSecurityIntro; private System.Windows.Forms.LinkLabel m_linkCertificate; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.TableLayoutPanel m_tlpManifest; private XenAdmin.Controls.Common.PasswordFailure m_ctrlError; } } diff --git a/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.cs b/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.cs index 9247e9827..9d8695ff9 100644 --- a/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.cs +++ b/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.cs @@ -61,17 +61,17 @@ namespace XenAdmin.Wizards.ImportWizard /// /// Gets the page's title (headline) /// - public override string PageTitle { get { return Messages.IMPORT_SECURITY_PAGE_TITLE; } } + public override string PageTitle => Messages.IMPORT_SECURITY_PAGE_TITLE; /// /// Gets the page's label in the (left hand side) wizard progress panel /// - public override string Text { get { return Messages.IMPORT_SECURITY_PAGE_TEXT; } } + public override string Text => Messages.IMPORT_SECURITY_PAGE_TEXT; /// /// Gets the value by which the help files section for this page is identified /// - public override string HelpID { get { return "Security"; } } + public override string HelpID => "Security"; protected override bool ImplementsIsDirty() { @@ -102,7 +102,6 @@ namespace XenAdmin.Wizards.ImportWizard if (DisableStep)//defensive check return; - m_tlpManifest.Enabled = m_hasManifest || m_hasSignature; m_linkCertificate.Visible = m_hasSignature; if (m_hasSignature)//check for signature first because m_hasManifest is True if m_hasSignature is True @@ -131,9 +130,9 @@ namespace XenAdmin.Wizards.ImportWizard /// public string Password { get; private set; } - public bool VerifyManifest { get { return m_hasManifest && m_tlpManifest.Enabled && m_checkBoxVerify.Checked; } } + public bool VerifyManifest => m_hasManifest && m_checkBoxVerify.Checked; - public bool VerifySignature { get { return m_hasSignature && m_tlpManifest.Enabled && m_checkBoxVerify.Checked; } } + public bool VerifySignature => m_hasSignature && m_checkBoxVerify.Checked; /// /// Package containing the selected OVF appliance. diff --git a/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.resx b/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.resx index 131f73bc7..80357b355 100644 --- a/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.resx +++ b/XenAdmin/Wizards/ImportWizard/ImportSecurityPage.resx @@ -112,25 +112,19 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True - - True - - - - GrowAndShrink - - + 2 + Left @@ -140,9 +134,9 @@ NoControl - + - 109, 28 + 115, 57 80, 13 @@ -163,10 +157,10 @@ m_linkCertificate - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - m_tlpManifest + tableLayoutPanel1 0 @@ -181,10 +175,13 @@ NoControl - 3, 26 + 3, 55 + + + 6, 0, 0, 0 - 100, 17 + 106, 17 60 @@ -196,72 +193,12 @@ m_checkBoxVerify - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - m_tlpManifest - - - 2 - - - Fill - - - 3, 36 - - - 3 - - - 509, 46 - - - 0 - - - m_tlpManifest - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanel1 - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="m_linkCertificate" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="m_labelVerify" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="m_checkBoxVerify" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100,Absolute,20,Absolute,20" /><Rows Styles="AutoSize,0,Absolute,10,AutoSize,0,Absolute,20,Absolute,20" /></TableLayoutSettings> - - - Fill - - - NoControl - - - 3, 0 - - - 503, 13 - - - 62 - - - labelVerify - - - m_labelVerify - - - XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - m_tlpManifest - - + 1 @@ -273,6 +210,9 @@ 3, 0 + + 3, 0, 3, 20 + 509, 13 @@ -280,7 +220,7 @@ 65 - Security settings allow you to validate OVF/OVA package you are importing. + Security settings allow you to validate the OVF/OVA package you are importing. lblSecurityIntro @@ -292,10 +232,7 @@ tableLayoutPanel1 - 1 - - - 1 + 3 True @@ -331,7 +268,7 @@ tableLayoutPanel1 - 2 + 4 Fill @@ -340,7 +277,7 @@ 0, 0 - 5 + 6 515, 286 @@ -352,7 +289,7 @@ tableLayoutPanel1 - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -361,9 +298,42 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="m_tlpManifest" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblSecurityIntro" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="m_ctrlError" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,Absolute,20,AutoSize,0,AutoSize,0,Percent,100,Absolute,20,Absolute,20" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="m_linkCertificate" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="m_checkBoxVerify" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="m_labelVerify" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="lblSecurityIntro" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="m_ctrlError" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Absolute,10,AutoSize,0,Percent,100" /></TableLayoutSettings> - + + Fill + + + NoControl + + + 3, 33 + + + 3, 0, 3, 6 + + + 509, 13 + + + 62 + + + labelVerify + + + m_labelVerify + + + XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + tableLayoutPanel1 + + + 2 + + True @@ -376,6 +346,6 @@ ImportSecurityPage - XenAdmin.Wizards.GenericPages.ImExPortPage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + XenAdmin.Controls.XenTabPage, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index e9a54d598..f89c770f0 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -18933,7 +18933,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to Verify the manifest matches the appliance files. This option will only activate if the appliance has a manifest file.. + /// Looks up a localized string similar to The appliance has a manifest file. You can choose to verify the manifest matches the appliance files.. /// public static string IMPORT_SECURITY_PAGE_VERIFY_CONTENT_DESCRIPTION { get { @@ -18951,7 +18951,7 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to Verify the digital signature of the appliance is valid. This option will activate only if the appliance has been digitally signed.. + /// Looks up a localized string similar to The appliance has been digitally signed. You can choose to verify the digital signature of the appliance is valid.. /// public static string IMPORT_SECURITY_PAGE_VERIFY_PRODUCER_DESCRIPTION { get { diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 09e65a63f..7627ac1d1 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -6651,13 +6651,13 @@ This might result in failure to migrate VMs to this server during the RPU or to &Verify manifest content - Verify the manifest matches the appliance files. This option will only activate if the appliance has a manifest file. + The appliance has a manifest file. You can choose to verify the manifest matches the appliance files. &Verify digital signature - Verify the digital signature of the appliance is valid. This option will activate only if the appliance has been digitally signed. + The appliance has been digitally signed. You can choose to verify the digital signature of the appliance is valid. OVA file is corrupt or contains invalid data.